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

Unified Diff: chrome/browser/password_manager/password_store_mac.h

Issue 2323893002: Stop using the Keychain for passwords finally and clean up the Chrome entries there. (Closed)
Patch Set: add a comment Created 4 years, 3 months 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 | « no previous file | chrome/browser/password_manager/password_store_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/password_manager/password_store_mac.h
diff --git a/chrome/browser/password_manager/password_store_mac.h b/chrome/browser/password_manager/password_store_mac.h
index c964cfc8f2dc1951b322e0c86702c1025824d2a1..d87f240dde397040248f6f66f2ba96ad700952b6 100644
--- a/chrome/browser/password_manager/password_store_mac.h
+++ b/chrome/browser/password_manager/password_store_mac.h
@@ -35,10 +35,11 @@ class PasswordStoreMac : public password_manager::PasswordStore {
public:
enum MigrationResult {
MIGRATION_OK,
- LOGIN_DB_UNAVAILABLE,
LOGIN_DB_FAILURE,
ENCRYPTOR_FAILURE,
- KEYCHAIN_BLOCKED,
+ // Chrome has read whatever it had access to. Not all the passwords were
+ // accessible.
+ MIGRATION_PARTIAL,
};
PasswordStoreMac(
@@ -50,11 +51,18 @@ class PasswordStoreMac : public password_manager::PasswordStore {
void InitWithTaskRunner(
scoped_refptr<base::SingleThreadTaskRunner> background_task_runner);
- // Reads all the passwords from the Keychain and stores them in LoginDatabase.
- // After the successful migration PasswordStoreMac should not be used. If the
- // migration fails, PasswordStoreMac remains the active backend for
- // PasswordStoreProxyMac.
- MigrationResult ImportFromKeychain();
+ // For all the entries in LoginDatabase reads the password value from the
+ // Keychain and updates the database.
+ // The method conducts "best effort" migration without the UI prompt.
+ // Inaccessible entries are deleted.
+ static MigrationResult ImportFromKeychain(
+ password_manager::LoginDatabase* login_db,
+ crypto::AppleKeychain* keychain);
+
+ // Delete Chrome-owned entries matching |forms| from the Keychain.
+ static void CleanUpKeychain(
+ crypto::AppleKeychain* keychain,
+ const std::vector<std::unique_ptr<autofill::PasswordForm>>& forms);
// To be used for testing.
password_manager::LoginDatabase* login_metadata_db() const {
« no previous file with comments | « no previous file | chrome/browser/password_manager/password_store_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698