| 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 #include "chrome/browser/ui/webui/settings/people_handler.h" | 5 #include "chrome/browser/ui/webui/settings/people_handler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 805 it != type_names.end(); ++it) { | 805 it != type_names.end(); ++it) { |
| 806 syncer::ModelType sync_type = it->first; | 806 syncer::ModelType sync_type = it->first; |
| 807 const std::string key_name = it->second; | 807 const std::string key_name = it->second; |
| 808 args.SetBoolean(key_name + "Registered", registered_types.Has(sync_type)); | 808 args.SetBoolean(key_name + "Registered", registered_types.Has(sync_type)); |
| 809 args.SetBoolean(key_name + "Synced", preferred_types.Has(sync_type)); | 809 args.SetBoolean(key_name + "Synced", preferred_types.Has(sync_type)); |
| 810 args.SetBoolean(key_name + "Enforced", enforced_types.Has(sync_type)); | 810 args.SetBoolean(key_name + "Enforced", enforced_types.Has(sync_type)); |
| 811 // TODO(treib): How do we want to handle pref groups, i.e. when only some of | 811 // TODO(treib): How do we want to handle pref groups, i.e. when only some of |
| 812 // the sync types behind a checkbox are force-enabled? crbug.com/403326 | 812 // the sync types behind a checkbox are force-enabled? crbug.com/403326 |
| 813 } | 813 } |
| 814 PrefService* pref_service = profile_->GetPrefs(); | 814 PrefService* pref_service = profile_->GetPrefs(); |
| 815 sync_driver::SyncPrefs sync_prefs(pref_service); | 815 syncer::SyncPrefs sync_prefs(pref_service); |
| 816 args.SetBoolean("syncAllDataTypes", sync_prefs.HasKeepEverythingSynced()); | 816 args.SetBoolean("syncAllDataTypes", sync_prefs.HasKeepEverythingSynced()); |
| 817 args.SetBoolean( | 817 args.SetBoolean( |
| 818 "paymentsIntegrationEnabled", | 818 "paymentsIntegrationEnabled", |
| 819 pref_service->GetBoolean(autofill::prefs::kAutofillWalletImportEnabled)); | 819 pref_service->GetBoolean(autofill::prefs::kAutofillWalletImportEnabled)); |
| 820 args.SetBoolean("encryptAllData", service->IsEncryptEverythingEnabled()); | 820 args.SetBoolean("encryptAllData", service->IsEncryptEverythingEnabled()); |
| 821 args.SetBoolean("encryptAllDataAllowed", | 821 args.SetBoolean("encryptAllDataAllowed", |
| 822 service->IsEncryptEverythingAllowed()); | 822 service->IsEncryptEverythingAllowed()); |
| 823 | 823 |
| 824 // We call IsPassphraseRequired() here, instead of calling | 824 // We call IsPassphraseRequired() here, instead of calling |
| 825 // IsPassphraseRequiredForDecryption(), because we want to show the passphrase | 825 // IsPassphraseRequiredForDecryption(), because we want to show the passphrase |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 898 base::FilePath profile_file_path = profile_->GetPath(); | 898 base::FilePath profile_file_path = profile_->GetPath(); |
| 899 ProfileMetrics::LogProfileSyncSignIn(profile_file_path); | 899 ProfileMetrics::LogProfileSyncSignIn(profile_file_path); |
| 900 | 900 |
| 901 // We're done configuring, so notify ProfileSyncService that it is OK to | 901 // We're done configuring, so notify ProfileSyncService that it is OK to |
| 902 // start syncing. | 902 // start syncing. |
| 903 sync_blocker_.reset(); | 903 sync_blocker_.reset(); |
| 904 service->SetFirstSetupComplete(); | 904 service->SetFirstSetupComplete(); |
| 905 } | 905 } |
| 906 | 906 |
| 907 } // namespace settings | 907 } // namespace settings |
| OLD | NEW |