Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(550)

Side by Side Diff: chrome/browser/ui/webui/sync_setup_handler.cc

Issue 76333002: Add Sync datatype for shared managed user settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/sync/sync_prefs.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/sync_prefs.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698