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

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

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.cc
diff --git a/components/sync/model_impl/shared_model_type_processor.cc b/components/sync/model_impl/shared_model_type_processor.cc
index ff5085945fd352d68a2f41e5ebec1cd4502d678a..5081f139315224adb77d4d74969f1ddf24ad3cf8 100644
--- a/components/sync/model_impl/shared_model_type_processor.cc
+++ b/components/sync/model_impl/shared_model_type_processor.cc
@@ -20,10 +20,13 @@
namespace syncer {
-SharedModelTypeProcessor::SharedModelTypeProcessor(ModelType type,
- ModelTypeSyncBridge* bridge)
+SharedModelTypeProcessor::SharedModelTypeProcessor(
+ ModelType type,
+ ModelTypeSyncBridge* bridge,
+ const base::RepeatingClosure& dump_stack)
: type_(type),
bridge_(bridge),
+ dump_stack_(dump_stack),
weak_ptr_factory_(this) {
DCHECK(bridge);
}
@@ -146,6 +149,11 @@ void SharedModelTypeProcessor::ReportError(const ModelError& error) {
model_error_ = error;
+ if (dump_stack_) {
+ // Upload a stack trace if possible.
+ dump_stack_.Run();
+ }
+
if (start_callback_) {
// Tell sync about the error instead of connecting.
ConnectIfReady();

Powered by Google App Engine
This is Rietveld 408576698