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

Issue 5939006: sync: beginnings of MessageLoop based SyncerThread (Closed)

Created:
10 years ago by tim (not reviewing)
Modified:
9 years, 6 months ago
Reviewers:
Nicolas Zea, akalin
CC:
chromium-reviews, ncarter (slow), ben+cc_chromium.org, Raghu Simha, idana, Paweł Hajdan Jr., lipalani1, tim (not reviewing)
Visibility:
Public.

Description

sync: beginnings of MessageLoop based SyncerThread This is just a checkpoint. It's not wired up to anything yet, and not fully implemented (note several NOTIMPLEMENTED() checks). For design and overview, see https://docs.google.com/document/d/1bFqqtpA7TZuwtyEqlSxgkCCRrHvYRnnH6HlHou2LwVo/edit BUG=26339 TEST=sync_unit_tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=72663

Patch Set 1 : take 1 #

Patch Set 2 : comment #

Total comments: 12

Patch Set 3 : remove refcount #

Patch Set 4 : review + tests #

Patch Set 5 : revert syncer_thread.cc #

Total comments: 35

Patch Set 6 : review+tests #

Total comments: 10

Patch Set 7 : reveiw3 #

Patch Set 8 : rebase #

Patch Set 9 : fix compile #

Patch Set 10 : fix specialization specialization #

Total comments: 3

Patch Set 11 : review #

Patch Set 12 : linux compile #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1639 lines, -20 lines) Patch
M chrome/browser/sync/engine/mock_model_safe_workers.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +23 lines, -5 lines 0 comments Download
A chrome/browser/sync/engine/mock_model_safe_workers.cc View 1 2 3 4 5 6 1 chunk +43 lines, -0 lines 0 comments Download
A chrome/browser/sync/engine/nudge_source.h View 1 2 3 4 5 1 chunk +29 lines, -0 lines 0 comments Download
A chrome/browser/sync/engine/polling_constants.h View 1 2 3 4 5 1 chunk +20 lines, -0 lines 0 comments Download
A chrome/browser/sync/engine/polling_constants.cc View 1 2 3 4 5 1 chunk +26 lines, -0 lines 0 comments Download
M chrome/browser/sync/engine/syncer.h View 1 2 3 4 5 6 7 3 chunks +3 lines, -2 lines 0 comments Download
A chrome/browser/sync/engine/syncer_thread2.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +237 lines, -0 lines 0 comments Download
A chrome/browser/sync/engine/syncer_thread2.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +498 lines, -0 lines 0 comments Download
A chrome/browser/sync/engine/syncer_thread2_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +554 lines, -0 lines 0 comments Download
M chrome/browser/sync/engine/syncer_thread_unittest.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/engine/syncer_types.h View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/sync/sessions/session_state.h View 1 2 3 3 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/sync/sessions/session_state.cc View 1 2 3 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/sync/sessions/sync_session.h View 1 2 3 4 5 6 3 chunks +16 lines, -6 lines 0 comments Download
M chrome/browser/sync/sessions/sync_session.cc View 1 2 3 4 5 6 2 chunks +28 lines, -1 line 0 comments Download
M chrome/browser/sync/sessions/sync_session_context.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/sync/sessions/sync_session_unittest.cc View 1 2 3 4 5 6 3 chunks +44 lines, -1 line 0 comments Download
A chrome/browser/sync/sessions/test_util.h View 1 2 3 4 5 6 1 chunk +39 lines, -0 lines 0 comments Download
A chrome/browser/sync/sessions/test_util.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +53 lines, -0 lines 0 comments Download
M chrome/browser/sync/test_profile_sync_service.cc View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -1 line 0 comments Download
M chrome/chrome.gyp View 1 2 3 4 5 6 7 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 2 chunks +4 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
tim (not reviewing)
As you can see, I'm in the process of writing tests for the limited functionality ...
10 years ago (2010-12-21 21:20:04 UTC) #1
Nicolas Zea
Some early, higher level comments. http://codereview.chromium.org/5939006/diff/8001/chrome/browser/sync/engine/syncer_thread2.cc File chrome/browser/sync/engine/syncer_thread2.cc (right): http://codereview.chromium.org/5939006/diff/8001/chrome/browser/sync/engine/syncer_thread2.cc#newcode70 chrome/browser/sync/engine/syncer_thread2.cc:70: if (!wait_interval_->had_nudge) Why don't ...
10 years ago (2010-12-23 21:49:20 UTC) #2
tim (not reviewing)
thanks for the feedback! http://codereview.chromium.org/5939006/diff/8001/chrome/browser/sync/engine/syncer_thread2.cc File chrome/browser/sync/engine/syncer_thread2.cc (right): http://codereview.chromium.org/5939006/diff/8001/chrome/browser/sync/engine/syncer_thread2.cc#newcode70 chrome/browser/sync/engine/syncer_thread2.cc:70: if (!wait_interval_->had_nudge) On 2010/12/23 21:49:20, ...
10 years ago (2010-12-24 04:23:47 UTC) #3
tim (not reviewing)
Just getting back to this now, should have a new patch up with more tests ...
9 years, 11 months ago (2011-01-12 19:29:29 UTC) #4
akalin
Couple of comments. Still looking. http://codereview.chromium.org/5939006/diff/8001/chrome/browser/sync/engine/syncer_thread2.h File chrome/browser/sync/engine/syncer_thread2.h (right): http://codereview.chromium.org/5939006/diff/8001/chrome/browser/sync/engine/syncer_thread2.h#newcode27 chrome/browser/sync/engine/syncer_thread2.h:27: class SyncerThread : public ...
9 years, 11 months ago (2011-01-13 00:36:34 UTC) #5
tim (not reviewing)
http://codereview.chromium.org/5939006/diff/8001/chrome/browser/sync/engine/syncer_thread2.h File chrome/browser/sync/engine/syncer_thread2.h (right): http://codereview.chromium.org/5939006/diff/8001/chrome/browser/sync/engine/syncer_thread2.h#newcode27 chrome/browser/sync/engine/syncer_thread2.h:27: class SyncerThread : public base::RefCountedThreadSafe<SyncerThread>, On 2011/01/13 00:36:34, akalin ...
9 years, 11 months ago (2011-01-13 18:26:56 UTC) #6
akalin
> I discussed this tradeoff in the design doc (linked in CL description). I > ...
9 years, 11 months ago (2011-01-13 21:49:48 UTC) #7
tim (not reviewing)
On 2011/01/13 21:49:48, akalin wrote: > > I discussed this tradeoff in the design doc ...
9 years, 11 months ago (2011-01-20 00:08:41 UTC) #8
akalin
LGTM, modulo nits and the rest of the tests! http://codereview.chromium.org/5939006/diff/38001/chrome/browser/sync/engine/mock_model_safe_workers.h File chrome/browser/sync/engine/mock_model_safe_workers.h (right): http://codereview.chromium.org/5939006/diff/38001/chrome/browser/sync/engine/mock_model_safe_workers.h#newcode9 chrome/browser/sync/engine/mock_model_safe_workers.h:9: ...
9 years, 11 months ago (2011-01-20 00:47:57 UTC) #9
Nicolas Zea
LGTM with nits (and a clarification question). Unfortunately, this is definitely going to conflict with ...
9 years, 11 months ago (2011-01-20 20:01:56 UTC) #10
tim (not reviewing)
Whew. The tests were tricky but I think they look good now! They uncovered a ...
9 years, 11 months ago (2011-01-25 03:23:05 UTC) #11
akalin
A few more comments http://codereview.chromium.org/5939006/diff/47001/chrome/browser/sync/engine/mock_model_safe_workers.h File chrome/browser/sync/engine/mock_model_safe_workers.h (right): http://codereview.chromium.org/5939006/diff/47001/chrome/browser/sync/engine/mock_model_safe_workers.h#newcode25 chrome/browser/sync/engine/mock_model_safe_workers.h:25: class MockModelSafeWorkerRegistrar : public ModelSafeWorkerRegistrar ...
9 years, 11 months ago (2011-01-25 06:09:53 UTC) #12
tim (not reviewing)
http://codereview.chromium.org/5939006/diff/47001/chrome/browser/sync/engine/syncer_thread2_unittest.cc File chrome/browser/sync/engine/syncer_thread2_unittest.cc (right): http://codereview.chromium.org/5939006/diff/47001/chrome/browser/sync/engine/syncer_thread2_unittest.cc#newcode366 chrome/browser/sync/engine/syncer_thread2_unittest.cc:366: EXPECT_FALSE(GetBackoffAndReset(&done)); On 2011/01/25 06:09:53, akalin wrote: > according to ...
9 years, 11 months ago (2011-01-25 17:15:22 UTC) #13
akalin
http://codereview.chromium.org/5939006/diff/47001/chrome/browser/sync/engine/syncer_thread2_unittest.cc File chrome/browser/sync/engine/syncer_thread2_unittest.cc (right): http://codereview.chromium.org/5939006/diff/47001/chrome/browser/sync/engine/syncer_thread2_unittest.cc#newcode366 chrome/browser/sync/engine/syncer_thread2_unittest.cc:366: EXPECT_FALSE(GetBackoffAndReset(&done)); Oh, I was referring to this line from ...
9 years, 11 months ago (2011-01-25 19:20:14 UTC) #14
tim (not reviewing)
Addressed all comments. http://codereview.chromium.org/5939006/diff/47001/chrome/browser/sync/sessions/sync_session_unittest.cc File chrome/browser/sync/sessions/sync_session_unittest.cc (right): http://codereview.chromium.org/5939006/diff/47001/chrome/browser/sync/sessions/sync_session_unittest.cc#newcode280 chrome/browser/sync/sessions/sync_session_unittest.cc:280: SyncSession one(&*context_, this, source_one, routes_one, workers_one); ...
9 years, 11 months ago (2011-01-25 23:11:36 UTC) #15
akalin
9 years, 11 months ago (2011-01-26 10:49:19 UTC) #16
LGTM after the nits below

http://codereview.chromium.org/5939006/diff/63001/chrome/browser/sync/engine/...
File chrome/browser/sync/engine/mock_model_safe_workers.h (right):

http://codereview.chromium.org/5939006/diff/63001/chrome/browser/sync/engine/...
chrome/browser/sync/engine/mock_model_safe_workers.h:35:
scoped_refptr<ModelSafeWorker> passive_worker_;
include ref_counted.h for this

http://codereview.chromium.org/5939006/diff/63001/chrome/browser/sync/engine/...
chrome/browser/sync/engine/mock_model_safe_workers.h:36: ModelSafeRoutingInfo
routes_;
do you need an include for this?

http://codereview.chromium.org/5939006/diff/63001/chrome/browser/sync/engine/...
File chrome/browser/sync/engine/syncer_thread2.h (right):

http://codereview.chromium.org/5939006/diff/63001/chrome/browser/sync/engine/...
chrome/browser/sync/engine/syncer_thread2.h:221: scoped_ptr<Syncer> syncer_;
need include for scoped_ptr

Powered by Google App Engine
This is Rietveld 408576698