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

Side by Side Diff: components/browser_sync/profile_sync_components_factory_impl.cc

Issue 2288473002: Implement Dump-on-DCHECK (via a new LogSeverity). (Closed)
Patch Set: Migrate some tests to EXPECT_DCHECK_DEATH Created 4 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
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 "components/browser_sync/profile_sync_components_factory_impl.h" 5 #include "components/browser_sync/profile_sync_components_factory_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/debug/dump_without_crashing.h" 9 #include "base/debug/dump_without_crashing.h"
10 #include "base/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 syncer::ModelTypeSet enabled_types) { 136 syncer::ModelTypeSet enabled_types) {
137 base::Closure error_callback = 137 base::Closure error_callback =
138 base::Bind(&syncer::ReportUnrecoverableError, channel_); 138 base::Bind(&syncer::ReportUnrecoverableError, channel_);
139 139
140 // TODO(stanisc): can DEVICE_INFO be one of disabled datatypes? 140 // TODO(stanisc): can DEVICE_INFO be one of disabled datatypes?
141 if (base::FeatureList::IsEnabled(switches::kSyncUSSDeviceInfo)) { 141 if (base::FeatureList::IsEnabled(switches::kSyncUSSDeviceInfo)) {
142 // Use an error callback that always uploads a stacktrace if it can to help 142 // Use an error callback that always uploads a stacktrace if it can to help
143 // get USS as stable as possible. 143 // get USS as stable as possible.
144 sync_service->RegisterDataTypeController( 144 sync_service->RegisterDataTypeController(
145 base::MakeUnique<ModelTypeController>( 145 base::MakeUnique<ModelTypeController>(
146 syncer::DEVICE_INFO, base::Bind(&base::debug::DumpWithoutCrashing), 146 syncer::DEVICE_INFO,
147 base::Bind(base::IgnoreResult(&base::debug::DumpWithoutCrashing)),
147 sync_client_, ui_thread_)); 148 sync_client_, ui_thread_));
148 } else { 149 } else {
149 sync_service->RegisterDataTypeController( 150 sync_service->RegisterDataTypeController(
150 base::MakeUnique<DeviceInfoDataTypeController>( 151 base::MakeUnique<DeviceInfoDataTypeController>(
151 error_callback, sync_client_, 152 error_callback, sync_client_,
152 sync_service->GetLocalDeviceInfoProvider())); 153 sync_service->GetLocalDeviceInfoProvider()));
153 } 154 }
154 155
155 // Autocomplete sync is enabled by default. Register unless explicitly 156 // Autocomplete sync is enabled by default. Register unless explicitly
156 // disabled. 157 // disabled.
157 if (!disabled_types.Has(syncer::AUTOFILL)) { 158 if (!disabled_types.Has(syncer::AUTOFILL)) {
158 if (base::FeatureList::IsEnabled(switches::kSyncUSSAutocomplete)) { 159 if (base::FeatureList::IsEnabled(switches::kSyncUSSAutocomplete)) {
159 sync_service->RegisterDataTypeController( 160 sync_service->RegisterDataTypeController(
160 base::MakeUnique<ModelTypeController>( 161 base::MakeUnique<ModelTypeController>(
161 syncer::AUTOFILL, base::Bind(&base::debug::DumpWithoutCrashing), 162 syncer::AUTOFILL,
163 base::Bind(base::IgnoreResult(&base::debug::DumpWithoutCrashing)),
162 sync_client_, db_thread_)); 164 sync_client_, db_thread_));
163 } else { 165 } else {
164 sync_service->RegisterDataTypeController( 166 sync_service->RegisterDataTypeController(
165 base::MakeUnique<AutofillDataTypeController>( 167 base::MakeUnique<AutofillDataTypeController>(
166 db_thread_, error_callback, sync_client_, web_data_service_)); 168 db_thread_, error_callback, sync_client_, web_data_service_));
167 } 169 }
168 } 170 }
169 171
170 // Autofill sync is enabled by default. Register unless explicitly 172 // Autofill sync is enabled by default. Register unless explicitly
171 // disabled. 173 // disabled.
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 433
432 // static 434 // static
433 void ProfileSyncComponentsFactoryImpl::OverridePrefsForUssTest(bool use_uss) { 435 void ProfileSyncComponentsFactoryImpl::OverridePrefsForUssTest(bool use_uss) {
434 override_prefs_controller_to_uss_for_test_ = use_uss; 436 override_prefs_controller_to_uss_for_test_ = use_uss;
435 } 437 }
436 438
437 bool ProfileSyncComponentsFactoryImpl:: 439 bool ProfileSyncComponentsFactoryImpl::
438 override_prefs_controller_to_uss_for_test_ = false; 440 override_prefs_controller_to_uss_for_test_ = false;
439 441
440 } // namespace browser_sync 442 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698