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

Issue 10413014: [Sync] Turn notifier::PushClient into an interface (Closed)

Created:
8 years, 7 months ago by akalin
Modified:
8 years, 7 months ago
Reviewers:
rlarocque
CC:
chromium-reviews
Visibility:
Public.

Description

[Sync] Turn notifier::PushClient into an interface Split the previous implementation into two pieces: XmppPushClient and NonBlockingPushClient. Add FakePushClient and FakePushClientObserver. Remove use of ThreadSafeObserverList. Add PushClient::CreateDefault() function, which creates a NonBlockingPushClient for an XmppPushClient. Dep-inject PushClient into P2PNotifier. Add some helper functions to notification_defines.{h,cc}. BUG=76764 TEST= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=138216 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=138431

Patch Set 1 #

Total comments: 2

Patch Set 2 : CreateForCurrentThread -> CreateDefault #

Patch Set 3 : Changed destruction method #

Patch Set 4 : sync to head #

Patch Set 5 : Go back to old destruction method, add NOTREACHED #

Patch Set 6 : Document destruction edge case #

Patch Set 7 : Add logging to track down memory corruption #

Patch Set 8 : Fix logging #

Patch Set 9 : Fix memory corruption bug #

Patch Set 10 : Sync to head #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1257 lines, -576 lines) Patch
M chrome/service/cloud_print/cloud_print_proxy_backend.cc View 1 4 chunks +4 lines, -3 lines 0 comments Download
M jingle/jingle.gyp View 4 chunks +14 lines, -2 lines 0 comments Download
A jingle/notifier/listener/fake_push_client.h View 1 chunk +55 lines, -0 lines 0 comments Download
A jingle/notifier/listener/fake_push_client.cc View 1 chunk +67 lines, -0 lines 0 comments Download
A jingle/notifier/listener/fake_push_client_observer.h View 1 chunk +35 lines, -0 lines 0 comments Download
A jingle/notifier/listener/fake_push_client_observer.cc View 1 chunk +34 lines, -0 lines 0 comments Download
A jingle/notifier/listener/non_blocking_push_client.h View 1 chunk +70 lines, -0 lines 0 comments Download
A jingle/notifier/listener/non_blocking_push_client.cc View 1 2 3 4 5 6 7 8 1 chunk +203 lines, -0 lines 0 comments Download
A jingle/notifier/listener/non_blocking_push_client_unittest.cc View 1 chunk +139 lines, -0 lines 0 comments Download
M jingle/notifier/listener/notification_defines.h View 4 chunks +15 lines, -0 lines 0 comments Download
M jingle/notifier/listener/notification_defines.cc View 1 chunk +50 lines, -0 lines 0 comments Download
M jingle/notifier/listener/push_client.h View 1 1 chunk +23 lines, -70 lines 0 comments Download
M jingle/notifier/listener/push_client.cc View 1 1 chunk +16 lines, -302 lines 0 comments Download
A jingle/notifier/listener/push_client_observer.h View 1 chunk +32 lines, -0 lines 0 comments Download
A jingle/notifier/listener/push_client_observer.cc View 1 chunk +11 lines, -0 lines 0 comments Download
M jingle/notifier/listener/push_client_unittest.cc View 1 2 chunks +17 lines, -68 lines 0 comments Download
A jingle/notifier/listener/xmpp_push_client.h View 1 chunk +87 lines, -0 lines 0 comments Download
A jingle/notifier/listener/xmpp_push_client.cc View 1 chunk +138 lines, -0 lines 0 comments Download
A jingle/notifier/listener/xmpp_push_client_unittest.cc View 1 chunk +120 lines, -0 lines 0 comments Download
M sync/notifier/p2p_notifier.h View 4 chunks +13 lines, -24 lines 0 comments Download
M sync/notifier/p2p_notifier.cc View 5 chunks +22 lines, -34 lines 0 comments Download
M sync/notifier/p2p_notifier_unittest.cc View 1 2 3 4 5 6 7 8 9 9 chunks +88 lines, -72 lines 0 comments Download
M sync/notifier/sync_notifier_factory.cc View 1 2 2 chunks +4 lines, -1 line 0 comments Download

Messages

Total messages: 14 (0 generated)
akalin
+rlarocque for review
8 years, 7 months ago (2012-05-18 22:27:42 UTC) #1
rlarocque
I didn't spend a lot of time looking at the new files because I assume ...
8 years, 7 months ago (2012-05-18 23:01:51 UTC) #2
akalin
committing after trybots https://chromiumcodereview.appspot.com/10413014/diff/1/jingle/notifier/listener/push_client.h File jingle/notifier/listener/push_client.h (right): https://chromiumcodereview.appspot.com/10413014/diff/1/jingle/notifier/listener/push_client.h#newcode29 jingle/notifier/listener/push_client.h:29: static scoped_ptr<PushClient> CreateForCurrentThread( On 2012/05/18 23:01:51, ...
8 years, 7 months ago (2012-05-18 23:21:57 UTC) #3
akalin
mac_rel looks legit, investigating...
8 years, 7 months ago (2012-05-19 01:26:10 UTC) #4
akalin
On 2012/05/19 01:26:10, akalin wrote: > mac_rel looks legit, investigating... Change destruction method to avoid ...
8 years, 7 months ago (2012-05-21 16:55:20 UTC) #5
akalin
On 2012/05/21 16:55:20, akalin wrote: > On 2012/05/19 01:26:10, akalin wrote: > > mac_rel looks ...
8 years, 7 months ago (2012-05-21 18:56:28 UTC) #6
akalin
On 2012/05/21 18:56:28, akalin wrote: > On 2012/05/21 16:55:20, akalin wrote: > > On 2012/05/19 ...
8 years, 7 months ago (2012-05-22 01:36:57 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/akalin@chromium.org/10413014/8028
8 years, 7 months ago (2012-05-22 01:37:30 UTC) #8
commit-bot: I haz the power
Try job failure for 10413014-8028 (retry) on win_rel for steps "base_unittests, sync_unit_tests" (clobber build). It's ...
8 years, 7 months ago (2012-05-22 04:11:31 UTC) #9
akalin
On 2012/05/22 04:11:31, I haz the power (commit-bot) wrote: > Try job failure for 10413014-8028 ...
8 years, 7 months ago (2012-05-22 04:24:40 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/akalin@chromium.org/10413014/16030
8 years, 7 months ago (2012-05-23 02:54:07 UTC) #11
commit-bot: I haz the power
Failed to apply patch for sync/notifier/p2p_notifier_unittest.cc: While running patch -p1 --forward --force; patching file sync/notifier/p2p_notifier_unittest.cc ...
8 years, 7 months ago (2012-05-23 02:54:17 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/akalin@chromium.org/10413014/7028
8 years, 7 months ago (2012-05-23 03:14:08 UTC) #13
akalin
8 years, 7 months ago (2012-05-23 03:25:58 UTC) #14
On 2012/05/23 03:14:08, I haz the power (commit-bot) wrote:
> CQ is trying da patch. Follow status at
> https://chromium-status.appspot.com/cq/akalin%40chromium.org/10413014/7028

For posterity, I figured out the memory stomping.  It was because I was posting
a task with 'this' in Core's constructor.  Since Core is ref-counted, the task
could then finish executing and destroy the Core object before the constructor
finishes.  Blurgh!

Powered by Google App Engine
This is Rietveld 408576698