OLD | NEW |
| (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 #include "chrome/browser/password_manager/password_manager_util.h" | |
6 | |
7 #include "components/sync_driver/sync_service.h" | |
8 | |
9 namespace password_manager_util { | |
10 | |
11 password_manager::PasswordSyncState GetPasswordSyncState( | |
12 const sync_driver::SyncService* sync_service) { | |
13 if (sync_service && sync_service->HasSyncSetupCompleted() && | |
14 sync_service->SyncActive() && | |
15 sync_service->GetActiveDataTypes().Has(syncer::PASSWORDS)) { | |
16 return sync_service->IsUsingSecondaryPassphrase() | |
17 ? password_manager::SYNCING_WITH_CUSTOM_PASSPHRASE | |
18 : password_manager::SYNCING_NORMAL_ENCRYPTION; | |
19 } | |
20 return password_manager::NOT_SYNCING_PASSWORDS; | |
21 } | |
22 | |
23 } // namespace password_manager_util | |
OLD | NEW |