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(30 == syncer::MODEL_TYPE_COUNT, | 98 COMPILE_ASSERT(31 == 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 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
902 | 902 |
903 LoginUIService* service = GetLoginUIService(); | 903 LoginUIService* service = GetLoginUIService(); |
904 DCHECK(service); | 904 DCHECK(service); |
905 service->current_login_ui()->FocusUI(); | 905 service->current_login_ui()->FocusUI(); |
906 return true; | 906 return true; |
907 } | 907 } |
908 | 908 |
909 LoginUIService* SyncSetupHandler::GetLoginUIService() const { | 909 LoginUIService* SyncSetupHandler::GetLoginUIService() const { |
910 return LoginUIServiceFactory::GetForProfile(GetProfile()); | 910 return LoginUIServiceFactory::GetForProfile(GetProfile()); |
911 } | 911 } |
OLD | NEW |