OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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_SYNC_BROWSER_SYNC_CREDENTIALS_FILTER_H_ | 5 #ifndef COMPONENTS_PASSWORD_MANAGER_SYNC_BROWSER_SYNC_CREDENTIALS_FILTER_H_ |
6 #define COMPONENTS_PASSWORD_MANAGER_SYNC_BROWSER_SYNC_CREDENTIALS_FILTER_H_ | 6 #define COMPONENTS_PASSWORD_MANAGER_SYNC_BROWSER_SYNC_CREDENTIALS_FILTER_H_ |
7 | 7 |
| 8 #include <memory> |
8 #include <string> | 9 #include <string> |
| 10 #include <vector> |
9 | 11 |
10 #include "base/callback.h" | 12 #include "base/callback.h" |
11 #include "base/macros.h" | 13 #include "base/macros.h" |
12 #include "components/autofill/core/common/password_form.h" | 14 #include "components/autofill/core/common/password_form.h" |
13 #include "components/password_manager/core/browser/credentials_filter.h" | 15 #include "components/password_manager/core/browser/credentials_filter.h" |
14 #include "components/password_manager/core/browser/password_manager_client.h" | 16 #include "components/password_manager/core/browser/password_manager_client.h" |
15 #include "components/signin/core/browser/signin_manager.h" | 17 #include "components/signin/core/browser/signin_manager.h" |
16 #include "components/sync/driver/sync_service.h" | 18 #include "components/sync/driver/sync_service.h" |
17 | 19 |
18 namespace password_manager { | 20 namespace password_manager { |
19 | 21 |
20 // The sync- and GAIA- aware implementation of the filter. | 22 // The sync- and GAIA- aware implementation of the filter. |
21 class SyncCredentialsFilter : public CredentialsFilter { | 23 class SyncCredentialsFilter : public CredentialsFilter { |
22 public: | 24 public: |
23 typedef base::Callback<const sync_driver::SyncService*(void)> | 25 typedef base::Callback<const syncer::SyncService*(void)> |
24 SyncServiceFactoryFunction; | 26 SyncServiceFactoryFunction; |
25 typedef base::Callback<const SigninManagerBase*(void)> | 27 typedef base::Callback<const SigninManagerBase*(void)> |
26 SigninManagerFactoryFunction; | 28 SigninManagerFactoryFunction; |
27 | 29 |
28 // Implements protection of sync credentials. Uses |client| to get the last | 30 // Implements protection of sync credentials. Uses |client| to get the last |
29 // commited entry URL for a check against GAIA reauth site. Uses the factory | 31 // commited entry URL for a check against GAIA reauth site. Uses the factory |
30 // functions repeatedly to get the sync service and signin manager to pass | 32 // functions repeatedly to get the sync service and signin manager to pass |
31 // them to sync_util methods. | 33 // them to sync_util methods. |
32 // TODO(vabr): Could we safely just get a pointer to the services for the | 34 // TODO(vabr): Could we safely just get a pointer to the services for the |
33 // lifetime of the filter? | 35 // lifetime of the filter? |
(...skipping 26 matching lines...) Expand all Loading... |
60 const SyncServiceFactoryFunction sync_service_factory_function_; | 62 const SyncServiceFactoryFunction sync_service_factory_function_; |
61 | 63 |
62 const SigninManagerFactoryFunction signin_manager_factory_function_; | 64 const SigninManagerFactoryFunction signin_manager_factory_function_; |
63 | 65 |
64 DISALLOW_COPY_AND_ASSIGN(SyncCredentialsFilter); | 66 DISALLOW_COPY_AND_ASSIGN(SyncCredentialsFilter); |
65 }; | 67 }; |
66 | 68 |
67 } // namespace password_manager | 69 } // namespace password_manager |
68 | 70 |
69 #endif // COMPONENTS_PASSWORD_MANAGER_SYNC_BROWSER_SYNC_CREDENTIALS_FILTER_H_ | 71 #endif // COMPONENTS_PASSWORD_MANAGER_SYNC_BROWSER_SYNC_CREDENTIALS_FILTER_H_ |
OLD | NEW |