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

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

Issue 2369033005: [Sync] Always upload stack traces for USS DeviceInfo. (Closed)
Patch Set: Created 4 years, 2 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 | no next file » | 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 "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/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/dump_without_crashing.h"
10 #include "base/feature_list.h" 11 #include "base/feature_list.h"
11 #include "base/memory/ptr_util.h" 12 #include "base/memory/ptr_util.h"
12 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
13 #include "build/build_config.h" 14 #include "build/build_config.h"
14 #include "components/autofill/core/browser/autofill_wallet_data_type_controller. h" 15 #include "components/autofill/core/browser/autofill_wallet_data_type_controller. h"
15 #include "components/autofill/core/browser/webdata/autofill_data_type_controller .h" 16 #include "components/autofill/core/browser/webdata/autofill_data_type_controller .h"
16 #include "components/autofill/core/browser/webdata/autofill_profile_data_type_co ntroller.h" 17 #include "components/autofill/core/browser/webdata/autofill_profile_data_type_co ntroller.h"
17 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" 18 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
18 #include "components/autofill/core/common/autofill_pref_names.h" 19 #include "components/autofill/core/common/autofill_pref_names.h"
19 #include "components/autofill/core/common/autofill_switches.h" 20 #include "components/autofill/core/common/autofill_switches.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 140
140 void ProfileSyncComponentsFactoryImpl::RegisterCommonDataTypes( 141 void ProfileSyncComponentsFactoryImpl::RegisterCommonDataTypes(
141 sync_driver::SyncService* sync_service, 142 sync_driver::SyncService* sync_service,
142 syncer::ModelTypeSet disabled_types, 143 syncer::ModelTypeSet disabled_types,
143 syncer::ModelTypeSet enabled_types) { 144 syncer::ModelTypeSet enabled_types) {
144 base::Closure error_callback = 145 base::Closure error_callback =
145 base::Bind(&ChromeReportUnrecoverableError, channel_); 146 base::Bind(&ChromeReportUnrecoverableError, channel_);
146 147
147 // TODO(stanisc): can DEVICE_INFO be one of disabled datatypes? 148 // TODO(stanisc): can DEVICE_INFO be one of disabled datatypes?
148 if (base::FeatureList::IsEnabled(switches::kSyncUSSDeviceInfo)) { 149 if (base::FeatureList::IsEnabled(switches::kSyncUSSDeviceInfo)) {
150 // Use an error callback that always uploads a stacktrace if it can to help
151 // get USS as stable as possible.
149 sync_service->RegisterDataTypeController( 152 sync_service->RegisterDataTypeController(
150 base::MakeUnique<UIModelTypeController>(syncer::DEVICE_INFO, 153 base::MakeUnique<UIModelTypeController>(
151 error_callback, sync_client_)); 154 syncer::DEVICE_INFO, base::Bind(&base::debug::DumpWithoutCrashing),
skym 2016/09/27 23:22:39 Hmm I was more thinking that we'd control the % wi
maxbogue 2016/09/27 23:37:33 I think this is more something we'll want to have
155 sync_client_));
152 } else { 156 } else {
153 sync_service->RegisterDataTypeController( 157 sync_service->RegisterDataTypeController(
154 base::MakeUnique<DeviceInfoDataTypeController>( 158 base::MakeUnique<DeviceInfoDataTypeController>(
155 error_callback, sync_client_, 159 error_callback, sync_client_,
156 sync_service->GetLocalDeviceInfoProvider())); 160 sync_service->GetLocalDeviceInfoProvider()));
157 } 161 }
158 162
159 // Autofill sync is enabled by default. Register unless explicitly 163 // Autofill sync is enabled by default. Register unless explicitly
160 // disabled. 164 // disabled.
161 if (!disabled_types.Has(syncer::AUTOFILL)) { 165 if (!disabled_types.Has(syncer::AUTOFILL)) {
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 419
416 // static 420 // static
417 void ProfileSyncComponentsFactoryImpl::OverridePrefsForUssTest(bool use_uss) { 421 void ProfileSyncComponentsFactoryImpl::OverridePrefsForUssTest(bool use_uss) {
418 override_prefs_controller_to_uss_for_test_ = use_uss; 422 override_prefs_controller_to_uss_for_test_ = use_uss;
419 } 423 }
420 424
421 bool ProfileSyncComponentsFactoryImpl:: 425 bool ProfileSyncComponentsFactoryImpl::
422 override_prefs_controller_to_uss_for_test_ = false; 426 override_prefs_controller_to_uss_for_test_ = false;
423 427
424 } // namespace browser_sync 428 } // namespace browser_sync
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698