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

Unified Diff: components/copresence/copresence_manager_impl.h

Issue 517753002: Remove weak_ptr from CopresenceManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
Index: components/copresence/copresence_manager_impl.h
diff --git a/components/copresence/copresence_manager_impl.h b/components/copresence/copresence_manager_impl.h
index 5134401391d6f4577d8dbdc2c1680c28c17a905c..24169a0cd482dfe6bfc0bcf853c85e0acb69f3a8 100644
--- a/components/copresence/copresence_manager_impl.h
+++ b/components/copresence/copresence_manager_impl.h
@@ -11,7 +11,6 @@
#include "base/callback.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
#include "components/copresence/proto/rpcs.pb.h"
#include "components/copresence/public/copresence_manager.h"
@@ -35,8 +34,7 @@ struct PendingRequest {
};
// The implementation for CopresenceManager.
-class CopresenceManagerImpl : public CopresenceManager,
- public base::SupportsWeakPtr<CopresenceManagerImpl> {
+class CopresenceManagerImpl : public CopresenceManager {
public:
virtual ~CopresenceManagerImpl();
virtual void ExecuteReportRequest(ReportRequest request,
@@ -54,6 +52,8 @@ class CopresenceManagerImpl : public CopresenceManager,
bool init_failed_;
std::vector<PendingRequest> pending_requests_queue_;
+ base::CancelableCallback<void(bool)> init_callback_;
+
// TODO(rkc): This code is almost identical to what we use in feedback to
// perform multiple blocking tasks and then run a post process method. Look
// into refactoring it all out to a common construct, like maybe a

Powered by Google App Engine
This is Rietveld 408576698