OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/options/sync_setup_handler.h" | 5 #include "chrome/browser/ui/webui/options/sync_setup_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 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
870 it != type_names.end(); ++it) { | 870 it != type_names.end(); ++it) { |
871 syncer::ModelType sync_type = it->first; | 871 syncer::ModelType sync_type = it->first; |
872 const std::string key_name = it->second; | 872 const std::string key_name = it->second; |
873 args.SetBoolean(key_name + "Registered", registered_types.Has(sync_type)); | 873 args.SetBoolean(key_name + "Registered", registered_types.Has(sync_type)); |
874 args.SetBoolean(key_name + "Synced", preferred_types.Has(sync_type)); | 874 args.SetBoolean(key_name + "Synced", preferred_types.Has(sync_type)); |
875 args.SetBoolean(key_name + "Enforced", enforced_types.Has(sync_type)); | 875 args.SetBoolean(key_name + "Enforced", enforced_types.Has(sync_type)); |
876 // TODO(treib): How do we want to handle pref groups, i.e. when only some of | 876 // TODO(treib): How do we want to handle pref groups, i.e. when only some of |
877 // the sync types behind a checkbox are force-enabled? crbug.com/403326 | 877 // the sync types behind a checkbox are force-enabled? crbug.com/403326 |
878 } | 878 } |
879 PrefService* pref_service = GetProfile()->GetPrefs(); | 879 PrefService* pref_service = GetProfile()->GetPrefs(); |
880 syncer::SyncPrefs sync_prefs(pref_service); | 880 sync_driver::SyncPrefs sync_prefs(pref_service); |
881 args.SetBoolean("passphraseFailed", passphrase_failed); | 881 args.SetBoolean("passphraseFailed", passphrase_failed); |
882 args.SetBoolean("syncAllDataTypes", sync_prefs.HasKeepEverythingSynced()); | 882 args.SetBoolean("syncAllDataTypes", sync_prefs.HasKeepEverythingSynced()); |
883 args.SetBoolean("syncNothing", false); // Always false during initial setup. | 883 args.SetBoolean("syncNothing", false); // Always false during initial setup. |
884 args.SetBoolean( | 884 args.SetBoolean( |
885 "paymentsIntegrationEnabled", | 885 "paymentsIntegrationEnabled", |
886 pref_service->GetBoolean(autofill::prefs::kAutofillWalletImportEnabled)); | 886 pref_service->GetBoolean(autofill::prefs::kAutofillWalletImportEnabled)); |
887 args.SetBoolean("encryptAllData", service->IsEncryptEverythingEnabled()); | 887 args.SetBoolean("encryptAllData", service->IsEncryptEverythingEnabled()); |
888 args.SetBoolean("encryptAllDataAllowed", | 888 args.SetBoolean("encryptAllDataAllowed", |
889 service->IsEncryptEverythingAllowed()); | 889 service->IsEncryptEverythingAllowed()); |
890 | 890 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
945 page, args); | 945 page, args); |
946 | 946 |
947 // Make sure the tab used for the Gaia sign in does not cover the settings | 947 // Make sure the tab used for the Gaia sign in does not cover the settings |
948 // tab. | 948 // tab. |
949 FocusUI(); | 949 FocusUI(); |
950 } | 950 } |
951 | 951 |
952 LoginUIService* SyncSetupHandler::GetLoginUIService() const { | 952 LoginUIService* SyncSetupHandler::GetLoginUIService() const { |
953 return LoginUIServiceFactory::GetForProfile(GetProfile()); | 953 return LoginUIServiceFactory::GetForProfile(GetProfile()); |
954 } | 954 } |
OLD | NEW |