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

Unified Diff: sync/util/test_unrecoverable_error_handler.cc

Issue 1275743002: [Sync] Remove backend unrecoverable error handler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix leak Created 5 years, 4 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 | « sync/util/test_unrecoverable_error_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/util/test_unrecoverable_error_handler.cc
diff --git a/sync/util/test_unrecoverable_error_handler.cc b/sync/util/test_unrecoverable_error_handler.cc
index 4bdbf3dc732e847e981a7c104baf09b32a48490e..14d39e6bdffa5c22e4724c993db3fd10f9491d53 100644
--- a/sync/util/test_unrecoverable_error_handler.cc
+++ b/sync/util/test_unrecoverable_error_handler.cc
@@ -8,7 +8,8 @@
namespace syncer {
-TestUnrecoverableErrorHandler::TestUnrecoverableErrorHandler() {}
+TestUnrecoverableErrorHandler::TestUnrecoverableErrorHandler()
+ : weak_ptr_factory_(this) {}
TestUnrecoverableErrorHandler::~TestUnrecoverableErrorHandler() {}
@@ -19,5 +20,10 @@ void TestUnrecoverableErrorHandler::OnUnrecoverableError(
<< from_here.function_name() << ": " << message;
}
+base::WeakPtr<TestUnrecoverableErrorHandler>
+TestUnrecoverableErrorHandler::GetWeakPtr() {
+ return weak_ptr_factory_.GetWeakPtr();
+}
+
} // namespace syncer
« no previous file with comments | « sync/util/test_unrecoverable_error_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698