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

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

Issue 15177003: Add Sync data type for managed users. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 7 years, 7 months 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 "preferences", 87 "preferences",
88 "passwords", 88 "passwords",
89 "autofill", 89 "autofill",
90 "themes", 90 "themes",
91 "typedUrls", 91 "typedUrls",
92 "extensions", 92 "extensions",
93 "apps", 93 "apps",
94 "tabs" 94 "tabs"
95 }; 95 };
96 96
97 COMPILE_ASSERT(27 == syncer::MODEL_TYPE_COUNT, 97 COMPILE_ASSERT(28 == syncer::MODEL_TYPE_COUNT,
98 update_kDataTypeNames_to_match_UserSelectableTypes); 98 update_kDataTypeNames_to_match_UserSelectableTypes);
99 99
100 typedef std::map<syncer::ModelType, const char*> ModelTypeNameMap; 100 typedef std::map<syncer::ModelType, const char*> ModelTypeNameMap;
101 101
102 ModelTypeNameMap GetSelectableTypeNameMap() { 102 ModelTypeNameMap GetSelectableTypeNameMap() {
103 ModelTypeNameMap type_names; 103 ModelTypeNameMap type_names;
104 syncer::ModelTypeSet type_set = syncer::UserSelectableTypes(); 104 syncer::ModelTypeSet type_set = syncer::UserSelectableTypes();
105 syncer::ModelTypeSet::Iterator it = type_set.First(); 105 syncer::ModelTypeSet::Iterator it = type_set.First();
106 DCHECK_EQ(arraysize(kDataTypeNames), type_set.Size()); 106 DCHECK_EQ(arraysize(kDataTypeNames), type_set.Size());
107 for (size_t i = 0; i < arraysize(kDataTypeNames) && it.Good(); 107 for (size_t i = 0; i < arraysize(kDataTypeNames) && it.Good();
(...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after
1373 return LoginUIServiceFactory::GetForProfile(GetProfile()); 1373 return LoginUIServiceFactory::GetForProfile(GetProfile());
1374 } 1374 }
1375 1375
1376 void SyncSetupHandler::CloseOverlay() { 1376 void SyncSetupHandler::CloseOverlay() {
1377 // Stop a timer to handle timeout in waiting for sync setup. 1377 // Stop a timer to handle timeout in waiting for sync setup.
1378 backend_start_timer_.reset(); 1378 backend_start_timer_.reset();
1379 1379
1380 CloseSyncSetup(); 1380 CloseSyncSetup();
1381 web_ui()->CallJavascriptFunction("OptionsPage.closeOverlay"); 1381 web_ui()->CallJavascriptFunction("OptionsPage.closeOverlay");
1382 } 1382 }
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