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

Issue 9749012: [Sync] Have SyncableService's take ownership of their SyncChangeProcessor. (Closed)

Created:
8 years, 9 months ago by zea%chromium.org
Modified:
8 years, 9 months ago
CC:
chromium-reviews, ncarter (slow), Raghu Simha, mihaip+watch_chromium.org, Aaron Boodman, pam+watch_chromium.org, timurrrr+watch_chromium.org, dhollowa+watch_chromium.org, glider+watch_chromium.org, tim (not reviewing), bruening+watch_chromium.org
Visibility:
Public.

Description

[Sync] Have SyncableService's take ownership of their SyncChangeProcessor. The UIDataTypeController now uses a SharedChangeProcessor, and passes a ref to the SyncableService's. Every SyncableService now owns its own change processor. Additionally, we use the ScopedPtr::Pass semantics for passing around SyncChangeProcessors to ensure SyncableServices properly take ownership. This, along with all the test updates it requires (most of the patch) fixes several leaks introduced in the previous patch to remove the Syncable Service Adapter. SyncableServiceMock is removed as it didn't play nice with scoped_ptr parameters (and was hardly used). BUG=117098, 117538 TEST=unit_tests with valgrind/drmemory/heapcheck TBR=georgy@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=128578

Patch Set 1 #

Patch Set 2 : Self review #

Patch Set 3 : Fix browser_tests #

Total comments: 12

Patch Set 4 : Initial comments #

Total comments: 6

Patch Set 5 : Comment #

Total comments: 9

Patch Set 6 : Comments. #

Patch Set 7 : Comments. #

Patch Set 8 : Rebase #

Patch Set 9 : Fix merge conflict #

Unified diffs Side-by-side diffs Delta from patch set Stats (+558 lines, -440 lines) Patch
M chrome/browser/extensions/app_notification_manager.h View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/app_notification_manager.cc View 1 3 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/extensions/app_notification_manager_sync_unittest.cc View 1 2 3 4 5 18 chunks +51 lines, -21 lines 0 comments Download
M chrome/browser/extensions/extension_service.h View 1 2 3 4 5 6 7 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_service.cc View 1 2 3 4 5 6 7 4 chunks +13 lines, -9 lines 0 comments Download
M chrome/browser/extensions/extension_service_unittest.cc View 1 2 3 4 5 6 7 12 chunks +13 lines, -14 lines 0 comments Download
M chrome/browser/extensions/settings/settings_apitest.cc View 1 2 3 4 5 2 chunks +24 lines, -1 line 0 comments Download
M chrome/browser/extensions/settings/settings_backend.h View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/settings/settings_backend.cc View 1 7 chunks +15 lines, -14 lines 0 comments Download
M chrome/browser/extensions/settings/settings_sync_unittest.cc View 1 2 3 4 5 28 chunks +202 lines, -132 lines 0 comments Download
M chrome/browser/extensions/settings/syncable_settings_storage.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/test_extension_service.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/test_extension_service.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/prefs/pref_model_associator.h View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/prefs/pref_model_associator.cc View 1 4 chunks +6 lines, -9 lines 0 comments Download
M chrome/browser/search_engines/template_url_service.h View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/search_engines/template_url_service.cc View 1 2 3 4 5 6 7 6 chunks +8 lines, -8 lines 0 comments Download
M chrome/browser/search_engines/template_url_service_sync_unittest.cc View 1 2 3 4 5 6 7 28 chunks +66 lines, -29 lines 0 comments Download
M chrome/browser/search_engines/template_url_service_test_util.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/search_engines/template_url_service_test_util.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/sync/api/fake_syncable_service.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/api/fake_syncable_service.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/sync/api/syncable_service.h View 1 2 3 4 2 chunks +2 lines, -3 lines 0 comments Download
D chrome/browser/sync/api/syncable_service_mock.h View 1 1 chunk +0 lines, -30 lines 0 comments Download
D chrome/browser/sync/api/syncable_service_mock.cc View 1 1 chunk +0 lines, -9 lines 0 comments Download
M chrome/browser/sync/glue/app_notification_data_type_controller_unittest.cc View 1 3 chunks +12 lines, -1 line 0 comments Download
M chrome/browser/sync/glue/new_non_frontend_data_type_controller.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/sync/glue/new_non_frontend_data_type_controller_unittest.cc View 6 chunks +4 lines, -13 lines 0 comments Download
M chrome/browser/sync/glue/search_engine_data_type_controller_unittest.cc View 1 4 chunks +12 lines, -0 lines 0 comments Download
M chrome/browser/sync/glue/shared_change_processor_unittest.cc View 5 chunks +8 lines, -9 lines 0 comments Download
M chrome/browser/sync/glue/ui_data_type_controller.h View 1 2 3 4 2 chunks +18 lines, -0 lines 0 comments Download
M chrome/browser/sync/glue/ui_data_type_controller.cc View 1 5 chunks +40 lines, -26 lines 0 comments Download
M chrome/browser/sync/glue/ui_data_type_controller_unittest.cc View 1 2 chunks +13 lines, -0 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_preference_unittest.cc View 2 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/webdata/autocomplete_syncable_service.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/webdata/autocomplete_syncable_service.cc View 1 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/webdata/autofill_profile_syncable_service.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/webdata/autofill_profile_syncable_service.cc View 1 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/webdata/autofill_profile_syncable_service_unittest.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 1 chunk +0 lines, -2 lines 0 comments Download
M tools/heapcheck/suppressions.txt View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -34 lines 0 comments Download
M tools/valgrind/drmemory/suppressions_full.txt View 1 2 3 4 5 6 7 1 chunk +0 lines, -25 lines 0 comments Download
M tools/valgrind/memcheck/suppressions.txt View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -19 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
Nicolas Zea
+Fred for sync changes. I'll get respective owners for the datatype specific parts once the ...
8 years, 9 months ago (2012-03-20 19:03:40 UTC) #1
akalin
I took a pass over this. I'm still thinking about whether making the service own ...
8 years, 9 months ago (2012-03-21 01:23:19 UTC) #2
Nicolas Zea
PTAL. Regarding ownership: From the point of view of non-ui datatypes, given that we don't ...
8 years, 9 months ago (2012-03-21 17:38:27 UTC) #3
akalin
I'll take a look at this first thing tomorrow. On 2012/03/21 17:38:27, nzea wrote: > ...
8 years, 9 months ago (2012-03-22 08:05:56 UTC) #4
akalin
LGTM http://codereview.chromium.org/9749012/diff/21001/chrome/browser/prefs/pref_model_associator.cc File chrome/browser/prefs/pref_model_associator.cc (left): http://codereview.chromium.org/9749012/diff/21001/chrome/browser/prefs/pref_model_associator.cc#oldcode429 chrome/browser/prefs/pref_model_associator.cc:429: StopSyncing(PREFERENCES); why was this deleted? (out of curiosity) ...
8 years, 9 months ago (2012-03-22 20:15:08 UTC) #5
Nicolas Zea
Done. Adding owner reviewers: +Sky for /search_engines +Asargent for /extensions +Georgy for webdata/ http://codereview.chromium.org/9749012/diff/21001/chrome/browser/prefs/pref_model_associator.cc File ...
8 years, 9 months ago (2012-03-22 21:22:18 UTC) #6
sky
LGTM http://codereview.chromium.org/9749012/diff/32001/chrome/browser/search_engines/template_url_service_sync_unittest.cc File chrome/browser/search_engines/template_url_service_sync_unittest.cc (right): http://codereview.chromium.org/9749012/diff/32001/chrome/browser/search_engines/template_url_service_sync_unittest.cc#newcode148 chrome/browser/search_engines/template_url_service_sync_unittest.cc:148: }; DISALLOW_COPY_AND_ASSIGN
8 years, 9 months ago (2012-03-22 21:45:30 UTC) #7
asargent_no_longer_on_chrome
http://codereview.chromium.org/9749012/diff/32001/chrome/browser/extensions/extension_service.h File chrome/browser/extensions/extension_service.h (right): http://codereview.chromium.org/9749012/diff/32001/chrome/browser/extensions/extension_service.h#newcode607 chrome/browser/extensions/extension_service.h:607: scoped_ptr<SyncChangeProcessor> sync_processor; Would it be worth adding a comment ...
8 years, 9 months ago (2012-03-22 22:54:11 UTC) #8
Nicolas Zea
PTAL https://chromiumcodereview.appspot.com/9749012/diff/32001/chrome/browser/extensions/extension_service.h File chrome/browser/extensions/extension_service.h (right): https://chromiumcodereview.appspot.com/9749012/diff/32001/chrome/browser/extensions/extension_service.h#newcode607 chrome/browser/extensions/extension_service.h:607: scoped_ptr<SyncChangeProcessor> sync_processor; On 2012/03/22 22:54:11, Antony Sargent wrote: ...
8 years, 9 months ago (2012-03-22 23:05:28 UTC) #9
asargent_no_longer_on_chrome
chrome/browser/extensions/* LGTM https://chromiumcodereview.appspot.com/9749012/diff/32001/chrome/browser/extensions/settings/settings_apitest.cc File chrome/browser/extensions/settings/settings_apitest.cc (right): https://chromiumcodereview.appspot.com/9749012/diff/32001/chrome/browser/extensions/settings/settings_apitest.cc#newcode45 chrome/browser/extensions/settings/settings_apitest.cc:45: class SyncChangeProcessorDelegate : public SyncChangeProcessor { On ...
8 years, 9 months ago (2012-03-22 23:14:24 UTC) #10
Nicolas Zea
8 years, 9 months ago (2012-03-23 18:02:37 UTC) #11
Moving GeorgY to TBR since the WebData changes were cosmetic. Committing once
trybots go green.

Powered by Google App Engine
This is Rietveld 408576698