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_CORE_BROWSER_PASSWORD_STORE_FACTORY_UTIL_H_ | 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_STORE_FACTORY_UTIL_H_ |
6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_STORE_FACTORY_UTIL_H_ | 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_STORE_FACTORY_UTIL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 namespace password_manager { | 21 namespace password_manager { |
22 | 22 |
23 // Activates or deactivates affiliation-based matching for |password_store|, | 23 // Activates or deactivates affiliation-based matching for |password_store|, |
24 // depending on whether or not the |sync_service| is syncing passwords stored | 24 // depending on whether or not the |sync_service| is syncing passwords stored |
25 // therein. The AffiliationService will use |db_thread_runner| as its backend | 25 // therein. The AffiliationService will use |db_thread_runner| as its backend |
26 // thread, and |request_context_getter| to fetch affiliation information. This | 26 // thread, and |request_context_getter| to fetch affiliation information. This |
27 // function should be called whenever there is a possibility that syncing | 27 // function should be called whenever there is a possibility that syncing |
28 // passwords has just started or ended. | 28 // passwords has just started or ended. |
29 void ToggleAffiliationBasedMatchingBasedOnPasswordSyncedState( | 29 void ToggleAffiliationBasedMatchingBasedOnPasswordSyncedState( |
30 PasswordStore* password_store, | 30 PasswordStore* password_store, |
31 syncer::SyncService* sync_service, | 31 sync_driver::SyncService* sync_service, |
32 net::URLRequestContextGetter* request_context_getter, | 32 net::URLRequestContextGetter* request_context_getter, |
33 const base::FilePath& profile_path, | 33 const base::FilePath& profile_path, |
34 scoped_refptr<base::SingleThreadTaskRunner> db_thread_runner); | 34 scoped_refptr<base::SingleThreadTaskRunner> db_thread_runner); |
35 | 35 |
36 // Trims the affiliation cache (placed in |profile_path|) for |password_store| | 36 // Trims the affiliation cache (placed in |profile_path|) for |password_store| |
37 // if affiliation-based matching is enabled, and completely deletes it | 37 // if affiliation-based matching is enabled, and completely deletes it |
38 // otherwise. The AffiliationService will use |db_thread_runner| as its backend | 38 // otherwise. The AffiliationService will use |db_thread_runner| as its backend |
39 // thread. | 39 // thread. |
40 void TrimOrDeleteAffiliationCacheForStoreAndPath( | 40 void TrimOrDeleteAffiliationCacheForStoreAndPath( |
41 PasswordStore* password_store, | 41 PasswordStore* password_store, |
42 const base::FilePath& profile_path, | 42 const base::FilePath& profile_path, |
43 scoped_refptr<base::SingleThreadTaskRunner> db_thread_runner); | 43 scoped_refptr<base::SingleThreadTaskRunner> db_thread_runner); |
44 | 44 |
45 // Creates a LoginDatabase. Looks in |profile_path| for the database file. | 45 // Creates a LoginDatabase. Looks in |profile_path| for the database file. |
46 // Does not call LoginDatabase::Init() -- to avoid UI jank, that needs to be | 46 // Does not call LoginDatabase::Init() -- to avoid UI jank, that needs to be |
47 // called by PasswordStore::Init() on the background thread. | 47 // called by PasswordStore::Init() on the background thread. |
48 std::unique_ptr<LoginDatabase> CreateLoginDatabase( | 48 std::unique_ptr<LoginDatabase> CreateLoginDatabase( |
49 const base::FilePath& profile_path); | 49 const base::FilePath& profile_path); |
50 | 50 |
51 } // namespace password_manager | 51 } // namespace password_manager |
52 | 52 |
53 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_STORE_FACTORY_UTIL_
H_ | 53 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_STORE_FACTORY_UTIL_
H_ |
OLD | NEW |