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

Unified Diff: components/sync/model/recording_model_type_change_processor.cc

Issue 2867143002: [sync] Check against nullptr web_data_backend->GetDatabase() (Closed)
Patch Set: rebase again Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/sync/model/recording_model_type_change_processor.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/model/recording_model_type_change_processor.cc
diff --git a/components/sync/model/recording_model_type_change_processor.cc b/components/sync/model/recording_model_type_change_processor.cc
index e74e44f451aa1fe9cf4b0ee4af8e3457d3e77ece..a20e2990fec038531c42966a6d887bfe5e502604 100644
--- a/components/sync/model/recording_model_type_change_processor.cc
+++ b/components/sync/model/recording_model_type_change_processor.cc
@@ -16,10 +16,13 @@ namespace {
std::unique_ptr<ModelTypeChangeProcessor> CreateAndAssignProcessor(
RecordingModelTypeChangeProcessor** processor_address,
+ bool expect_error,
ModelType type,
ModelTypeSyncBridge* bridge) {
auto processor = base::MakeUnique<RecordingModelTypeChangeProcessor>();
*processor_address = processor.get();
+ if (expect_error)
+ processor->ExpectError();
// Not all compilers are smart enough to up cast during copy elision, so we
// explicitly create a correctly typed unique_ptr.
return base::WrapUnique(processor.release());
@@ -61,9 +64,10 @@ void RecordingModelTypeChangeProcessor::SetIsTrackingMetadata(
// static
ModelTypeSyncBridge::ChangeProcessorFactory
RecordingModelTypeChangeProcessor::FactoryForBridgeTest(
- RecordingModelTypeChangeProcessor** processor_address) {
+ RecordingModelTypeChangeProcessor** processor_address,
+ bool expect_error) {
return base::Bind(&CreateAndAssignProcessor,
- base::Unretained(processor_address));
+ base::Unretained(processor_address), expect_error);
}
} // namespace syncer
« no previous file with comments | « components/sync/model/recording_model_type_change_processor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698