summaryrefslogtreecommitdiffstats
path: root/components/invalidation/unacked_invalidation_set.cc
diff options
context:
space:
mode:
authorrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-09 06:04:28 +0000
committerrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-09 06:05:59 +0000
commit5fe215c80e32d8576cc590057819b8ef95fdee8b (patch)
treed9ecf1cf6e352a80a823e4e64d1a91f653a4e95f /components/invalidation/unacked_invalidation_set.cc
parent4fc5b8310061b03ac42f73f700ae32a50027b7da (diff)
downloadchromium_src-5fe215c80e32d8576cc590057819b8ef95fdee8b.zip
chromium_src-5fe215c80e32d8576cc590057819b8ef95fdee8b.tar.gz
chromium_src-5fe215c80e32d8576cc590057819b8ef95fdee8b.tar.bz2
Remove WeakHandle from components/invalidation
Replaces the use of WeakHandle with combinations of WeakPtr and SingleThreadTaskRunner. The WeakHandle encapsulates both of these concepts, so the replacment is not much different from the original. The removal makes the code a bit uglier. However, the WeakHandle is not widely used outside of sync and has no chance of making it to base/. Its use in new code is discouraged. Moving components/invalidation/ to WeakPtr and SingeThreadTaskRunner will make it more future proof, and allow us to remove its dependency on libsync. TBR=dcheng BUG=394925 Review URL: https://codereview.chromium.org/446223002 Cr-Commit-Position: refs/heads/master@{#288523} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288523 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/invalidation/unacked_invalidation_set.cc')
-rw-r--r--components/invalidation/unacked_invalidation_set.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/components/invalidation/unacked_invalidation_set.cc b/components/invalidation/unacked_invalidation_set.cc
index b2d2e68..9519f33 100644
--- a/components/invalidation/unacked_invalidation_set.cc
+++ b/components/invalidation/unacked_invalidation_set.cc
@@ -56,13 +56,14 @@ void UnackedInvalidationSet::AddSet(
}
void UnackedInvalidationSet::ExportInvalidations(
- WeakHandle<AckHandler> ack_handler,
+ base::WeakPtr<AckHandler> ack_handler,
+ scoped_refptr<base::SingleThreadTaskRunner> ack_handler_task_runner,
ObjectIdInvalidationMap* out) const {
for (SingleObjectInvalidationSet::const_iterator it = invalidations_.begin();
it != invalidations_.end(); ++it) {
// Copy the invalidation and set the copy's ack_handler.
Invalidation inv(*it);
- inv.set_ack_handler(ack_handler);
+ inv.SetAckHandler(ack_handler, ack_handler_task_runner);
out->Insert(inv);
}
}