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

Issue 2075012: Replace changes_channel with an observer list. (Closed)

Created:
10 years, 7 months ago by Zachary Kuznia
Modified:
9 years, 7 months ago
Reviewers:
chron_chromium.org
CC:
chromium-reviews, ncarter (slow), ben+cc_chromium.org, tim (not reviewing), idana, Paweł Hajdan Jr.
Visibility:
Public.

Description

Replace changes_channel with an observer list. BUG=none TEST=Run unit tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=49490

Patch Set 1 #

Patch Set 2 : Remove old comments #

Patch Set 3 : Code Review #

Patch Set 4 : Templatated stuff. #

Patch Set 5 : Remove old comments. #

Total comments: 4

Patch Set 6 : Remove another use of event_sys #

Patch Set 7 : Fix sync unit tests #

Total comments: 14

Patch Set 8 : Code review stuff #

Patch Set 9 : Code Review #

Patch Set 10 : Lint fixes #

Total comments: 3

Patch Set 11 : rebase #

Patch Set 12 : Ready for checkin #

Unified diffs Side-by-side diffs Delta from patch set Stats (+268 lines, -82 lines) Patch
M chrome/browser/sync/engine/all_status.h View 6 7 8 9 10 4 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/sync/engine/all_status.cc View 6 7 8 9 10 11 4 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/sync/engine/syncapi.cc View 1 2 3 4 5 6 7 8 9 10 9 chunks +13 lines, -16 lines 0 comments Download
M chrome/browser/sync/engine/syncer.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/engine/syncer.cc View 1 chunk +9 lines, -4 lines 0 comments Download
M chrome/browser/sync/engine/syncer_command.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/engine/syncer_end_command.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/engine/syncer_thread.h View 6 7 8 9 10 3 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/sync/engine/syncer_thread.cc View 6 7 8 9 10 6 chunks +9 lines, -9 lines 0 comments Download
M chrome/browser/sync/engine/syncer_thread_unittest.cc View 7 12 chunks +19 lines, -20 lines 0 comments Download
M chrome/browser/sync/engine/syncer_types.h View 2 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/sync/engine/syncer_unittest.cc View 4 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/sync/sessions/sync_session_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/syncable/syncable.h View 1 2 3 4 6 chunks +8 lines, -5 lines 0 comments Download
M chrome/browser/sync/syncable/syncable.cc View 1 2 3 4 5 6 7 8 4 chunks +8 lines, -4 lines 0 comments Download
A chrome/browser/sync/util/channel.h View 4 5 6 7 8 9 10 11 1 chunk +140 lines, -0 lines 0 comments Download
A chrome/browser/sync/util/channel_unittest.cc View 9 1 chunk +32 lines, -0 lines 0 comments Download
M chrome/chrome.gyp View 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 9 10 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Zachary Kuznia
10 years, 7 months ago (2010-05-18 20:51:15 UTC) #1
chron
As discussed, we should encapsulate a bit of the logic. Looks good though. On Tue, ...
10 years, 7 months ago (2010-05-18 21:25:08 UTC) #2
Zachary Kuznia
Encapsulated. Please have another look.
10 years, 7 months ago (2010-05-20 00:03:25 UTC) #3
chron_chromium.org
http://codereview.chromium.org/2075012/diff/11001/12001 File chrome/browser/sync/engine/syncapi.cc (right): http://codereview.chromium.org/2075012/diff/11001/12001#newcode833 chrome/browser/sync/engine/syncapi.cc:833: virtual void HandleChannelEvent(const syncable::DirectoryChangeEvent& event); doesn't this mean the ...
10 years, 7 months ago (2010-05-20 01:05:29 UTC) #4
Zachary Kuznia
http://codereview.chromium.org/2075012/diff/11001/12001 File chrome/browser/sync/engine/syncapi.cc (right): http://codereview.chromium.org/2075012/diff/11001/12001#newcode833 chrome/browser/sync/engine/syncapi.cc:833: virtual void HandleChannelEvent(const syncable::DirectoryChangeEvent& event); No, the argument is ...
10 years, 7 months ago (2010-05-20 15:39:52 UTC) #5
chron_chromium.org
http://codereview.chromium.org/2075012/diff/20001/17004 File chrome/browser/sync/engine/syncapi.cc (right): http://codereview.chromium.org/2075012/diff/20001/17004#newcode843 chrome/browser/sync/engine/syncapi.cc:843: void HandleChannelEvent(const SyncerEvent& event); do you mean virtual http://codereview.chromium.org/2075012/diff/20001/17017 ...
10 years, 7 months ago (2010-05-20 17:49:04 UTC) #6
chron_chromium.org
http://codereview.chromium.org/2075012/diff/20001/17017 File chrome/browser/sync/util/channel.h (right): http://codereview.chromium.org/2075012/diff/20001/17017#newcode19 chrome/browser/sync/util/channel.h:19: virtual void HandleChannelEvent( is this line wrap necessary http://codereview.chromium.org/2075012/diff/20001/17017#newcode52 ...
10 years, 7 months ago (2010-05-20 17:58:48 UTC) #7
Zachary Kuznia
http://codereview.chromium.org/2075012/diff/20001/17004 File chrome/browser/sync/engine/syncapi.cc (right): http://codereview.chromium.org/2075012/diff/20001/17004#newcode843 chrome/browser/sync/engine/syncapi.cc:843: void HandleChannelEvent(const SyncerEvent& event); On 2010/05/20 17:49:04, chron_chromium.org wrote: ...
10 years, 6 months ago (2010-05-31 10:14:17 UTC) #8
chron_chromium.org
10 years, 6 months ago (2010-06-01 18:37:05 UTC) #9
LGTM with fixes

http://codereview.chromium.org/2075012/diff/31001/32016
File chrome/browser/sync/util/channel.h (right):

http://codereview.chromium.org/2075012/diff/31001/32016#newcode18
chrome/browser/sync/util/channel.h:18: // TYPICAL USAGE:
In the overview, note the expected add / remove order, destruction order, and
typical behavior. Like, what happens if we try to shut down the channel while
events are still in it, etc? Document some more of the behavior.

http://codereview.chromium.org/2075012/diff/31001/32016#newcode65
chrome/browser/sync/util/channel.h:65: // This class managers a connection to a
channel.  When it is destructed, it
manages

http://codereview.chromium.org/2075012/diff/31001/32016#newcode65
chrome/browser/sync/util/channel.h:65: // This class managers a connection to a
channel.  When it is destructed, it
destroyed?

Powered by Google App Engine
This is Rietveld 408576698