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

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

Issue 1207373002: Implement Mac Keychain migration algorithm. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ilya's comments Created 5 years, 6 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 4c14c37ded9a0a2d627141191196e6410fec3840..02bd85349c9240a72645af5306974500e28bf754 100644
--- a/chrome/browser/password_manager/password_store_mac.h
+++ b/chrome/browser/password_manager/password_store_mac.h
@@ -31,6 +31,14 @@ class LoginDatabase;
// http://dev.chromium.org/developers/design-documents/os-x-password-manager-keychain-integration
class PasswordStoreMac : public password_manager::PasswordStore {
public:
+ enum MigrationResult {
+ MIGRATION_OK,
+ LOGIN_DB_UNAVAILABLE,
+ LOGIN_DB_FAILURE,
+ ENCRYPTOR_FAILURE,
+ KEYCHAIN_BLOCKED,
+ };
+
PasswordStoreMac(
scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner,
scoped_refptr<base::SingleThreadTaskRunner> db_thread_runner,
@@ -41,6 +49,12 @@ 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();
+
// To be used for testing.
password_manager::LoginDatabase* login_metadata_db() const {
return login_metadata_db_;
« 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