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

Side by Side Diff: chrome/browser/sync/profile_sync_components_factory_impl.cc

Issue 11946058: Add password sync for Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/sync/profile_sync_service.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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "build/build_config.h" 6 #include "build/build_config.h"
7 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 7 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
8 #include "chrome/browser/extensions/api/storage/settings_frontend.h" 8 #include "chrome/browser/extensions/api/storage/settings_frontend.h"
9 #include "chrome/browser/extensions/app_notification_manager.h" 9 #include "chrome/browser/extensions/app_notification_manager.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 !command_line_->HasSwitch(switches::kDisableSyncTypedUrls)) { 124 !command_line_->HasSwitch(switches::kDisableSyncTypedUrls)) {
125 pss->RegisterDataTypeController( 125 pss->RegisterDataTypeController(
126 new TypedUrlDataTypeController(this, profile_, pss)); 126 new TypedUrlDataTypeController(this, profile_, pss));
127 } 127 }
128 128
129 // Session sync is enabled by default. Register unless explicitly disabled. 129 // Session sync is enabled by default. Register unless explicitly disabled.
130 if (!command_line_->HasSwitch(switches::kDisableSyncTabs)) { 130 if (!command_line_->HasSwitch(switches::kDisableSyncTabs)) {
131 pss->RegisterDataTypeController( 131 pss->RegisterDataTypeController(
132 new SessionDataTypeController(this, profile_, pss)); 132 new SessionDataTypeController(this, profile_, pss));
133 } 133 }
134
135 // Password sync is enabled by default. Register unless explicitly
136 // disabled.
137 if (!command_line_->HasSwitch(switches::kDisableSyncPasswords)) {
138 #if !defined(OS_ANDROID)
139 pss->RegisterDataTypeController(
140 new PasswordDataTypeController(this, profile_, pss));
141 #else
142 // On Android, enable password sync only when Keystore encryption
143 // is enabled.
144 if (command_line_->HasSwitch(switches::kSyncKeystoreEncryption)) {
145 pss->RegisterDataTypeController(
146 new PasswordDataTypeController(this, profile_, pss));
147 }
148 #endif
149 }
134 } 150 }
135 151
136 void ProfileSyncComponentsFactoryImpl::RegisterDesktopDataTypes( 152 void ProfileSyncComponentsFactoryImpl::RegisterDesktopDataTypes(
137 ProfileSyncService* pss) { 153 ProfileSyncService* pss) {
138 // App sync is enabled by default. Register unless explicitly 154 // App sync is enabled by default. Register unless explicitly
139 // disabled. 155 // disabled.
140 if (!command_line_->HasSwitch(switches::kDisableSyncApps)) { 156 if (!command_line_->HasSwitch(switches::kDisableSyncApps)) {
141 pss->RegisterDataTypeController( 157 pss->RegisterDataTypeController(
142 new ExtensionDataTypeController(syncer::APPS, this, profile_, pss)); 158 new ExtensionDataTypeController(syncer::APPS, this, profile_, pss));
143 } 159 }
144 160
145 // Autofill sync is enabled by default. Register unless explicitly 161 // Autofill sync is enabled by default. Register unless explicitly
146 // disabled. 162 // disabled.
147 if (!command_line_->HasSwitch(switches::kDisableSyncAutofill)) { 163 if (!command_line_->HasSwitch(switches::kDisableSyncAutofill)) {
148 pss->RegisterDataTypeController( 164 pss->RegisterDataTypeController(
149 new AutofillDataTypeController(this, profile_, pss)); 165 new AutofillDataTypeController(this, profile_, pss));
150 } 166 }
151 167
152 // Extension sync is enabled by default. Register unless explicitly 168 // Extension sync is enabled by default. Register unless explicitly
153 // disabled. 169 // disabled.
154 if (!command_line_->HasSwitch(switches::kDisableSyncExtensions)) { 170 if (!command_line_->HasSwitch(switches::kDisableSyncExtensions)) {
155 pss->RegisterDataTypeController( 171 pss->RegisterDataTypeController(
156 new ExtensionDataTypeController(syncer::EXTENSIONS, 172 new ExtensionDataTypeController(syncer::EXTENSIONS,
157 this, profile_, pss)); 173 this, profile_, pss));
158 } 174 }
159 175
160 // Password sync is enabled by default. Register unless explicitly
161 // disabled.
162 if (!command_line_->HasSwitch(switches::kDisableSyncPasswords)) {
163 pss->RegisterDataTypeController(
164 new PasswordDataTypeController(this, profile_, pss));
165 }
166
167 // Preference sync is enabled by default. Register unless explicitly 176 // Preference sync is enabled by default. Register unless explicitly
168 // disabled. 177 // disabled.
169 if (!command_line_->HasSwitch(switches::kDisableSyncPreferences)) { 178 if (!command_line_->HasSwitch(switches::kDisableSyncPreferences)) {
170 pss->RegisterDataTypeController( 179 pss->RegisterDataTypeController(
171 new UIDataTypeController(syncer::PREFERENCES, this, profile_, pss)); 180 new UIDataTypeController(syncer::PREFERENCES, this, profile_, pss));
172 } 181 }
173 182
174 #if defined(ENABLE_THEMES) 183 #if defined(ENABLE_THEMES)
175 // Theme sync is enabled by default. Register unless explicitly disabled. 184 // Theme sync is enabled by default. Register unless explicitly disabled.
176 if (!command_line_->HasSwitch(switches::kDisableSyncThemes)) { 185 if (!command_line_->HasSwitch(switches::kDisableSyncThemes)) {
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 ProfileSyncComponentsFactory::SyncComponents 378 ProfileSyncComponentsFactory::SyncComponents
370 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents( 379 ProfileSyncComponentsFactoryImpl::CreateSessionSyncComponents(
371 ProfileSyncService* profile_sync_service, 380 ProfileSyncService* profile_sync_service,
372 DataTypeErrorHandler* error_handler) { 381 DataTypeErrorHandler* error_handler) {
373 SessionModelAssociator* model_associator = 382 SessionModelAssociator* model_associator =
374 new SessionModelAssociator(profile_sync_service, error_handler); 383 new SessionModelAssociator(profile_sync_service, error_handler);
375 SessionChangeProcessor* change_processor = 384 SessionChangeProcessor* change_processor =
376 new SessionChangeProcessor(error_handler, model_associator); 385 new SessionChangeProcessor(error_handler, model_associator);
377 return SyncComponents(model_associator, change_processor); 386 return SyncComponents(model_associator, change_processor);
378 } 387 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/profile_sync_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698