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

Unified Diff: components/invalidation/invalidation.h

Issue 446223002: Remove WeakHandle from components/invalidation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes 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
« no previous file with comments | « components/invalidation/DEPS ('k') | components/invalidation/invalidation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/invalidation/invalidation.h
diff --git a/components/invalidation/invalidation.h b/components/invalidation/invalidation.h
index 4d6a5e3d7cc5e84505bae0c498ebf9263164c79b..ccc1b199e7dc3e1766976f9ec6dacc9d0ad9adfa 100644
--- a/components/invalidation/invalidation.h
+++ b/components/invalidation/invalidation.h
@@ -9,11 +9,12 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
+#include "base/sequenced_task_runner.h"
#include "base/values.h"
#include "components/invalidation/ack_handle.h"
#include "components/invalidation/invalidation_export.h"
#include "google/cacheinvalidation/include/types.h"
-#include "sync/internal_api/public/util/weak_handle.h"
namespace syncer {
@@ -57,7 +58,9 @@ class INVALIDATION_EXPORT Invalidation {
//
// Note that some sources of invalidations do not support ack tracking, and do
// not set the ack_handler. This will be hidden from users of this class.
- void set_ack_handler(syncer::WeakHandle<AckHandler> ack_handler);
+ void SetAckHandler(
+ base::WeakPtr<AckHandler> handler,
+ scoped_refptr<base::SequencedTaskRunner> handler_task_runner);
// Returns whether or not this instance supports ack tracking. This will
// depend on whether or not the source of invaliadations supports
@@ -113,7 +116,10 @@ class INVALIDATION_EXPORT Invalidation {
// A locally generated unique ID used to manage local acknowledgements.
AckHandle ack_handle_;
- syncer::WeakHandle<AckHandler> ack_handler_;
+
+ // The acknowledgement tracking handler and its thread.
+ base::WeakPtr<AckHandler> ack_handler_;
+ scoped_refptr<base::SequencedTaskRunner> ack_handler_task_runner_;
};
} // namespace syncer
« no previous file with comments | « components/invalidation/DEPS ('k') | components/invalidation/invalidation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698