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

Unified Diff: sync/util/mock_unrecoverable_error_handler.h

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/tools/sync_client.cc ('k') | sync/util/mock_unrecoverable_error_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/util/mock_unrecoverable_error_handler.h
diff --git a/sync/util/mock_unrecoverable_error_handler.h b/sync/util/mock_unrecoverable_error_handler.h
index aacde89e852fb879ce5d1f9f3021a5526b1ca32f..0d80fe9251d37567754c2d9a3c7837b44094478c 100644
--- a/sync/util/mock_unrecoverable_error_handler.h
+++ b/sync/util/mock_unrecoverable_error_handler.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
#include "sync/internal_api/public/util/unrecoverable_error_handler.h"
namespace syncer {
@@ -24,9 +25,13 @@ class MockUnrecoverableErrorHandler : public UnrecoverableErrorHandler {
// Returns the number of times this handler has been invoked.
int invocation_count() const;
+ base::WeakPtr<MockUnrecoverableErrorHandler> GetWeakPtr();
+
private:
int invocation_count_;
+ base::WeakPtrFactory<MockUnrecoverableErrorHandler> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(MockUnrecoverableErrorHandler);
};
« no previous file with comments | « sync/tools/sync_client.cc ('k') | sync/util/mock_unrecoverable_error_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698