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

Side by Side Diff: components/password_manager/core/browser/password_store_default.h

Issue 1226303003: Start the migration of passwords from the Keychain. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix the test Created 5 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_STORE_DEFAULT_H_ 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_STORE_DEFAULT_H_
6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_STORE_DEFAULT_H_ 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_STORE_DEFAULT_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 ScopedVector<autofill::PasswordForm>* forms) override; 61 ScopedVector<autofill::PasswordForm>* forms) override;
62 void AddSiteStatsImpl(const InteractionsStats& stats) override; 62 void AddSiteStatsImpl(const InteractionsStats& stats) override;
63 void RemoveSiteStatsImpl(const GURL& origin_domain) override; 63 void RemoveSiteStatsImpl(const GURL& origin_domain) override;
64 scoped_ptr<InteractionsStats> GetSiteStatsImpl( 64 scoped_ptr<InteractionsStats> GetSiteStatsImpl(
65 const GURL& origin_domain) override; 65 const GURL& origin_domain) override;
66 66
67 inline bool DeleteAndRecreateDatabaseFile() { 67 inline bool DeleteAndRecreateDatabaseFile() {
68 return login_db_->DeleteAndRecreateDatabaseFile(); 68 return login_db_->DeleteAndRecreateDatabaseFile();
69 } 69 }
70 70
71 void set_login_db(scoped_ptr<password_manager::LoginDatabase> login_db) {
72 login_db_.swap(login_db);
73 }
74
71 private: 75 private:
72 // Resets |login_db_| on the background thread. 76 // Resets |login_db_| on the background thread.
73 void ResetLoginDB(); 77 void ResetLoginDB();
74 78
75 // The login SQL database. The LoginDatabase instance is received via the 79 // The login SQL database. The LoginDatabase instance is received via the
76 // in an uninitialized state, so as to allow injecting mocks, then Init() is 80 // in an uninitialized state, so as to allow injecting mocks, then Init() is
77 // called on the DB thread in a deferred manner. If opening the DB fails, 81 // called on the DB thread in a deferred manner. If opening the DB fails,
78 // |login_db_| will be reset and stay NULL for the lifetime of |this|. 82 // |login_db_| will be reset and stay NULL for the lifetime of |this|.
79 scoped_ptr<LoginDatabase> login_db_; 83 scoped_ptr<LoginDatabase> login_db_;
80 84
81 DISALLOW_COPY_AND_ASSIGN(PasswordStoreDefault); 85 DISALLOW_COPY_AND_ASSIGN(PasswordStoreDefault);
82 }; 86 };
83 87
84 } // namespace password_manager 88 } // namespace password_manager
85 89
86 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_STORE_DEFAULT_H_ 90 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_STORE_DEFAULT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698