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

Unified Diff: components/sync/model_impl/shared_model_type_processor.h

Issue 2639393002: [Sync] Make SMTP always have the dump stack function. (Closed)
Patch Set: Rebase. Created 3 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 side-by-side diff with in-line comments
Download patch
Index: components/sync/model_impl/shared_model_type_processor.h
diff --git a/components/sync/model_impl/shared_model_type_processor.h b/components/sync/model_impl/shared_model_type_processor.h
index 266d7a9e30bd13087d127c5314a17afdafba5ab6..8606ab975da5f7b03fb0e1d2a324bd6c36f50b47 100644
--- a/components/sync/model_impl/shared_model_type_processor.h
+++ b/components/sync/model_impl/shared_model_type_processor.h
@@ -37,7 +37,9 @@ class SharedModelTypeProcessor : public ModelTypeProcessor,
public ModelTypeChangeProcessor,
base::NonThreadSafe {
public:
- SharedModelTypeProcessor(ModelType type, ModelTypeSyncBridge* bridge);
+ SharedModelTypeProcessor(ModelType type,
+ ModelTypeSyncBridge* bridge,
+ const base::RepeatingClosure& dump_stack);
~SharedModelTypeProcessor() override;
// Whether the processor is allowing changes to its model type. If this is
@@ -175,12 +177,17 @@ class SharedModelTypeProcessor : public ModelTypeProcessor,
// processor instance so the pointer should never become invalid.
ModelTypeSyncBridge* const bridge_;
+ // Function to capture and upload a stack trace when an error occurs.
+ const base::RepeatingClosure dump_stack_;
+
// The callback used for informing sync of errors; will be non-null after
// OnSyncStarting has been called.
ModelErrorHandler error_handler_;
// WeakPtrFactory for this processor which will be sent to sync thread.
base::WeakPtrFactory<SharedModelTypeProcessor> weak_ptr_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(SharedModelTypeProcessor);
};
} // namespace syncer

Powered by Google App Engine
This is Rietveld 408576698