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

Side by Side Diff: chrome/browser/password_manager/password_store_proxy_mac.h

Issue 1192963002: Implement PasswordStoreProxyMac and SimplePasswordStoreMac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed the 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/password_manager/password_store_proxy_mac.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_PROXY_MAC_H_
6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_PROXY_MAC_H_
7
8 #include "components/password_manager/core/browser/password_store.h"
9
10 namespace crypto {
11 class AppleKeychain;
12 }
13
14 namespace password_manager {
15 class LoginDatabase;
16 }
17
18 class PasswordStoreMac;
19 class SimplePasswordStoreMac;
20
21 // The class is a proxy for either PasswordStoreMac or SimplePasswordStoreMac.
22 // It is responsible for performing migration from PasswordStoreMac to
23 // SimplePasswordStoreMac and instantiating a correct backend according to the
24 // user's state.
25 class PasswordStoreProxyMac : public password_manager::PasswordStore {
26 public:
27 PasswordStoreProxyMac(
28 scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner,
29 scoped_ptr<crypto::AppleKeychain> keychain,
30 scoped_ptr<password_manager::LoginDatabase> login_db);
31
32 bool Init(const syncer::SyncableService::StartSyncFlare& flare) override;
33 void Shutdown() override;
34
35 private:
36 ~PasswordStoreProxyMac() override;
37
38 password_manager::PasswordStore* GetBackend() const;
39
40 // PasswordStore:
41 scoped_refptr<base::SingleThreadTaskRunner> GetBackgroundTaskRunner()
42 override;
43 void ReportMetricsImpl(const std::string& sync_username,
44 bool custom_passphrase_sync_enabled) override;
45 password_manager::PasswordStoreChangeList AddLoginImpl(
46 const autofill::PasswordForm& form) override;
47 password_manager::PasswordStoreChangeList UpdateLoginImpl(
48 const autofill::PasswordForm& form) override;
49 password_manager::PasswordStoreChangeList RemoveLoginImpl(
50 const autofill::PasswordForm& form) override;
51 password_manager::PasswordStoreChangeList RemoveLoginsCreatedBetweenImpl(
52 base::Time delete_begin,
53 base::Time delete_end) override;
54 password_manager::PasswordStoreChangeList RemoveLoginsSyncedBetweenImpl(
55 base::Time delete_begin,
56 base::Time delete_end) override;
57 ScopedVector<autofill::PasswordForm> FillMatchingLogins(
58 const autofill::PasswordForm& form,
59 AuthorizationPromptPolicy prompt_policy) override;
60 void GetAutofillableLoginsImpl(
61 scoped_ptr<PasswordStore::GetLoginsRequest> request) override;
62 void GetBlacklistLoginsImpl(
63 scoped_ptr<PasswordStore::GetLoginsRequest> request) override;
64 bool FillAutofillableLogins(
65 ScopedVector<autofill::PasswordForm>* forms) override;
66 bool FillBlacklistLogins(
67 ScopedVector<autofill::PasswordForm>* forms) override;
68 void AddSiteStatsImpl(
69 const password_manager::InteractionsStats& stats) override;
70 void RemoveSiteStatsImpl(const GURL& origin_domain) override;
71 scoped_ptr<password_manager::InteractionsStats> GetSiteStatsImpl(
72 const GURL& origin_domain) override;
73
74 scoped_refptr<PasswordStoreMac> password_store_mac_;
75 scoped_refptr<SimplePasswordStoreMac> password_store_simple_;
76
77 DISALLOW_COPY_AND_ASSIGN(PasswordStoreProxyMac);
78 };
79
80 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_PROXY_MAC_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/password_manager/password_store_proxy_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698