| 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/sync_setup_handler.h" | 5 #include "chrome/browser/ui/webui/sync_setup_handler.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 "preferences", | 88 "preferences", |
| 89 "passwords", | 89 "passwords", |
| 90 "autofill", | 90 "autofill", |
| 91 "themes", | 91 "themes", |
| 92 "typedUrls", | 92 "typedUrls", |
| 93 "extensions", | 93 "extensions", |
| 94 "apps", | 94 "apps", |
| 95 "tabs" | 95 "tabs" |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 COMPILE_ASSERT(31 == syncer::MODEL_TYPE_COUNT, | 98 COMPILE_ASSERT(32 == syncer::MODEL_TYPE_COUNT, |
| 99 update_kDataTypeNames_to_match_UserSelectableTypes); | 99 update_kDataTypeNames_to_match_UserSelectableTypes); |
| 100 | 100 |
| 101 typedef std::map<syncer::ModelType, const char*> ModelTypeNameMap; | 101 typedef std::map<syncer::ModelType, const char*> ModelTypeNameMap; |
| 102 | 102 |
| 103 ModelTypeNameMap GetSelectableTypeNameMap() { | 103 ModelTypeNameMap GetSelectableTypeNameMap() { |
| 104 ModelTypeNameMap type_names; | 104 ModelTypeNameMap type_names; |
| 105 syncer::ModelTypeSet type_set = syncer::UserSelectableTypes(); | 105 syncer::ModelTypeSet type_set = syncer::UserSelectableTypes(); |
| 106 syncer::ModelTypeSet::Iterator it = type_set.First(); | 106 syncer::ModelTypeSet::Iterator it = type_set.First(); |
| 107 DCHECK_EQ(arraysize(kDataTypeNames), type_set.Size()); | 107 DCHECK_EQ(arraysize(kDataTypeNames), type_set.Size()); |
| 108 for (size_t i = 0; i < arraysize(kDataTypeNames) && it.Good(); | 108 for (size_t i = 0; i < arraysize(kDataTypeNames) && it.Good(); |
| (...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 904 | 904 |
| 905 LoginUIService* service = GetLoginUIService(); | 905 LoginUIService* service = GetLoginUIService(); |
| 906 DCHECK(service); | 906 DCHECK(service); |
| 907 service->current_login_ui()->FocusUI(); | 907 service->current_login_ui()->FocusUI(); |
| 908 return true; | 908 return true; |
| 909 } | 909 } |
| 910 | 910 |
| 911 LoginUIService* SyncSetupHandler::GetLoginUIService() const { | 911 LoginUIService* SyncSetupHandler::GetLoginUIService() const { |
| 912 return LoginUIServiceFactory::GetForProfile(GetProfile()); | 912 return LoginUIServiceFactory::GetForProfile(GetProfile()); |
| 913 } | 913 } |
| OLD | NEW |