OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "base/logging.h" | 6 #include "base/logging.h" |
7 #include "chrome/browser/defaults.h" | 7 #include "chrome/browser/defaults.h" |
8 #include "chrome/browser/profile.h" | 8 #include "chrome/browser/profile.h" |
9 #include "chrome/browser/sync/glue/autofill_change_processor.h" | 9 #include "chrome/browser/sync/glue/autofill_change_processor.h" |
10 #include "chrome/browser/sync/glue/autofill_data_type_controller.h" | 10 #include "chrome/browser/sync/glue/autofill_data_type_controller.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 new AutofillDataTypeController(this, profile_, pss)); | 78 new AutofillDataTypeController(this, profile_, pss)); |
79 } | 79 } |
80 | 80 |
81 // Bookmark sync is enabled by default. Register unless explicitly | 81 // Bookmark sync is enabled by default. Register unless explicitly |
82 // disabled. | 82 // disabled. |
83 if (!command_line_->HasSwitch(switches::kDisableSyncBookmarks)) { | 83 if (!command_line_->HasSwitch(switches::kDisableSyncBookmarks)) { |
84 pss->RegisterDataTypeController( | 84 pss->RegisterDataTypeController( |
85 new BookmarkDataTypeController(this, profile_, pss)); | 85 new BookmarkDataTypeController(this, profile_, pss)); |
86 } | 86 } |
87 | 87 |
88 // Extension sync is disabled by default. Register only if | 88 // Extension sync is enabled by default. Register unless explicitly |
89 // explicitly enabled. | 89 // disabled. |
90 if (command_line_->HasSwitch(switches::kEnableSyncExtensions)) { | 90 if (!command_line_->HasSwitch(switches::kDisableSyncExtensions)) { |
91 pss->RegisterDataTypeController( | 91 pss->RegisterDataTypeController( |
92 new ExtensionDataTypeController(this, profile_, pss)); | 92 new ExtensionDataTypeController(this, profile_, pss)); |
93 } | 93 } |
94 | 94 |
95 // Password sync is disabled by default. Register only if | 95 // Password sync is disabled by default. Register only if |
96 // explicitly enabled. | 96 // explicitly enabled. |
97 if (command_line_->HasSwitch(switches::kEnableSyncPasswords)) { | 97 if (command_line_->HasSwitch(switches::kEnableSyncPasswords)) { |
98 pss->RegisterDataTypeController( | 98 pss->RegisterDataTypeController( |
99 new PasswordDataTypeController(this, profile_, pss)); | 99 new PasswordDataTypeController(this, profile_, pss)); |
100 } | 100 } |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 browser_sync::UnrecoverableErrorHandler* error_handler) { | 215 browser_sync::UnrecoverableErrorHandler* error_handler) { |
216 TypedUrlModelAssociator* model_associator = | 216 TypedUrlModelAssociator* model_associator = |
217 new TypedUrlModelAssociator(profile_sync_service, | 217 new TypedUrlModelAssociator(profile_sync_service, |
218 history_backend); | 218 history_backend); |
219 TypedUrlChangeProcessor* change_processor = | 219 TypedUrlChangeProcessor* change_processor = |
220 new TypedUrlChangeProcessor(model_associator, | 220 new TypedUrlChangeProcessor(model_associator, |
221 history_backend, | 221 history_backend, |
222 error_handler); | 222 error_handler); |
223 return SyncComponents(model_associator, change_processor); | 223 return SyncComponents(model_associator, change_processor); |
224 } | 224 } |
OLD | NEW |