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

Issue 11624037: [sync] Componentize sync: Part 6: Add more SYNC_EXPORTs to files in src/sync/ (Closed)

Created:
8 years ago by Raghu Simha
Modified:
7 years, 11 months ago
Reviewers:
rlarocque, akalin
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, haitaol1, tim (not reviewing)
Visibility:
Public.

Description

[sync] Componentize sync: Part 6: Add more SYNC_EXPORTs to files in src/sync/ One of the long term goals of the sync team is to pull sync code out of chrome.dll and into its own component. As of today, several chrome targets depend on various sync targets as defined in sync.gyp. We'd like to move to a world where all chrome targets outside sync.gyp simply depend on the target sync.gyp:sync, which is built into its own component. This patch sets the stage for full componentization by adding SYNC_EXPORT_PRIVATE (and some SYNC_EXPORT) annotations to classes / methods within src/sync so that various chrome targets can reference them. It also makes a few assorted fixes like adding missing destructors, etc. These errors get flagged when component builds are enabled after componentizing sync. The final step of breaking off sync into its own component will be done in https://codereview.chromium.org/11412211. BUG=136928 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=174801

Patch Set 1 #

Patch Set 2 : Fix tests after rebase #

Total comments: 10

Patch Set 3 : CR Feedback #

Patch Set 4 : Rebase on 174610 #

Total comments: 1

Patch Set 5 : Fix linker errors from component build (enabled in another patch) #

Total comments: 1

Patch Set 6 : CR Feedback #

Patch Set 7 : Re-export WeakHandleCoreBase #

Total comments: 8

Patch Set 8 : CR Feedback #

Patch Set 9 : Rebase (no code changes) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+389 lines, -267 lines) Patch
M sync/api/sync_change.h View 1 chunk +1 line, -1 line 0 comments Download
M sync/api/sync_error.h View 1 chunk +1 line, -1 line 0 comments Download
M sync/engine/apply_control_data_updates.h View 2 chunks +5 lines, -2 lines 0 comments Download
M sync/engine/apply_updates_and_resolve_conflicts_command.h View 1 2 3 4 5 6 7 2 chunks +3 lines, -2 lines 0 comments Download
M sync/engine/backoff_delay_provider.h View 3 chunks +3 lines, -2 lines 0 comments Download
M sync/engine/build_commit_command.h View 3 chunks +3 lines, -2 lines 0 comments Download
M sync/engine/download_updates_command.h View 2 chunks +2 lines, -2 lines 0 comments Download
M sync/engine/get_commit_ids_command.h View 3 chunks +3 lines, -2 lines 0 comments Download
M sync/engine/model_changing_syncer_command.h View 3 chunks +3 lines, -2 lines 0 comments Download
M sync/engine/net/server_connection_manager.h View 6 chunks +7 lines, -5 lines 0 comments Download
M sync/engine/process_commit_response_command.h View 3 chunks +4 lines, -2 lines 0 comments Download
M sync/engine/process_updates_command.h View 3 chunks +4 lines, -2 lines 0 comments Download
M sync/engine/sync_engine_event.h View 4 chunks +4 lines, -3 lines 0 comments Download
M sync/engine/sync_scheduler.h View 4 chunks +5 lines, -3 lines 0 comments Download
M sync/engine/sync_scheduler_impl.h View 4 chunks +4 lines, -3 lines 0 comments Download
M sync/engine/sync_session_job.h View 2 chunks +3 lines, -2 lines 0 comments Download
M sync/engine/syncer.h View 2 chunks +2 lines, -1 line 0 comments Download
M sync/engine/syncer_command.h View 3 chunks +3 lines, -2 lines 0 comments Download
M sync/engine/syncer_proto_util.h View 2 chunks +2 lines, -2 lines 0 comments Download
M sync/engine/throttled_data_type_tracker.h View 3 chunks +3 lines, -2 lines 0 comments Download
M sync/engine/traffic_recorder.h View 4 chunks +4 lines, -3 lines 0 comments Download
M sync/internal_api/debug_info_event_listener.h View 3 chunks +7 lines, -5 lines 0 comments Download
M sync/internal_api/http_bridge.cc View 1 2 3 4 5 6 7 2 chunks +6 lines, -1 line 0 comments Download
M sync/internal_api/http_bridge_unittest.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M sync/internal_api/js_mutation_event_observer.h View 3 chunks +3 lines, -2 lines 0 comments Download
M sync/internal_api/js_sync_encryption_handler_observer.h View 3 chunks +4 lines, -2 lines 0 comments Download
M sync/internal_api/js_sync_manager_observer.h View 3 chunks +3 lines, -2 lines 0 comments Download
M sync/internal_api/public/base/invalidation.h View 1 2 3 4 5 6 7 2 chunks +4 lines, -1 line 0 comments Download
M sync/internal_api/public/base/invalidation.cc View 2 chunks +7 lines, -1 line 0 comments Download
M sync/internal_api/public/base/model_type.h View 4 chunks +7 lines, -5 lines 0 comments Download
M sync/internal_api/public/base/model_type_invalidation_map.h View 2 chunks +5 lines, -5 lines 0 comments Download
M sync/internal_api/public/base/node_ordinal.h View 3 chunks +4 lines, -3 lines 0 comments Download
M sync/internal_api/public/base/progress_marker_map.h View 2 chunks +2 lines, -2 lines 0 comments Download
M sync/internal_api/public/change_record.h View 1 chunk +1 line, -1 line 0 comments Download
M sync/internal_api/public/engine/model_safe_worker.h View 3 chunks +6 lines, -5 lines 0 comments Download
M sync/internal_api/public/engine/polling_constants.h View 2 chunks +3 lines, -3 lines 0 comments Download
M sync/internal_api/public/http_bridge.h View 1 2 3 4 5 6 7 3 chunks +9 lines, -9 lines 0 comments Download
M sync/internal_api/public/http_post_provider_interface.h View 2 chunks +4 lines, -2 lines 0 comments Download
M sync/internal_api/public/sync_manager.h View 1 chunk +1 line, -1 line 0 comments Download
M sync/internal_api/public/user_share.h View 3 chunks +3 lines, -2 lines 0 comments Download
M sync/internal_api/public/util/syncer_error.h View 1 chunk +1 line, -1 line 0 comments Download
M sync/internal_api/public/util/weak_handle.h View 3 4 5 6 3 chunks +3 lines, -2 lines 0 comments Download
M sync/internal_api/sync_encryption_handler_impl.h View 3 chunks +3 lines, -2 lines 0 comments Download
M sync/internal_api/sync_manager_impl.h View 3 chunks +3 lines, -2 lines 0 comments Download
M sync/internal_api/syncapi_internal.h View 3 chunks +5 lines, -3 lines 0 comments Download
M sync/internal_api/syncapi_server_connection_manager.h View 3 chunks +4 lines, -2 lines 0 comments Download
M sync/js/js_backend.h View 3 chunks +4 lines, -2 lines 0 comments Download
M sync/notifier/ack_tracker.h View 3 chunks +4 lines, -3 lines 0 comments Download
M sync/notifier/invalidation_handler.h View 2 chunks +3 lines, -2 lines 0 comments Download
M sync/notifier/invalidation_notifier.h View 3 chunks +3 lines, -2 lines 0 comments Download
M sync/notifier/invalidation_state_tracker.h View 1 chunk +2 lines, -1 line 0 comments Download
M sync/notifier/invalidation_util.h View 2 chunks +4 lines, -2 lines 0 comments Download
M sync/notifier/invalidator.h View 3 chunks +3 lines, -2 lines 0 comments Download
M sync/notifier/invalidator_state.h View 1 chunk +2 lines, -2 lines 0 comments Download
M sync/notifier/non_blocking_invalidator.h View 3 chunks +3 lines, -2 lines 0 comments Download
M sync/notifier/object_id_invalidation_map.h View 2 chunks +4 lines, -3 lines 0 comments Download
M sync/notifier/p2p_invalidator.h View 3 chunks +6 lines, -5 lines 0 comments Download
M sync/notifier/push_client_channel.h View 3 chunks +5 lines, -4 lines 0 comments Download
M sync/notifier/registration_manager.h View 3 chunks +3 lines, -2 lines 0 comments Download
M sync/notifier/state_writer.h View 2 chunks +4 lines, -2 lines 0 comments Download
M sync/notifier/sync_invalidation_listener.h View 4 chunks +6 lines, -5 lines 0 comments Download
M sync/notifier/sync_system_resources.h View 3 chunks +4 lines, -2 lines 0 comments Download
M sync/protocol/proto_enum_conversions.h View 1 chunk +8 lines, -6 lines 0 comments Download
M sync/protocol/proto_value_conversions.h View 2 chunks +26 lines, -26 lines 0 comments Download
M sync/sessions/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M sync/sessions/debug_info_getter.h View 2 chunks +3 lines, -2 lines 0 comments Download
M sync/sessions/ordered_commit_set.h View 3 chunks +3 lines, -2 lines 0 comments Download
M sync/sessions/status_controller.h View 2 chunks +3 lines, -2 lines 0 comments Download
M sync/sessions/sync_session.h View 3 chunks +4 lines, -3 lines 0 comments Download
M sync/sessions/sync_session_context.h View 3 chunks +3 lines, -2 lines 0 comments Download
M sync/syncable/directory.h View 2 chunks +2 lines, -2 lines 0 comments Download
M sync/syncable/directory_backing_store.h View 1 2 3 4 4 chunks +5 lines, -2 lines 0 comments Download
M sync/syncable/directory_backing_store.cc View 1 2 2 chunks +1 line, -2 lines 0 comments Download
M sync/syncable/directory_backing_store_unittest.cc View 3 chunks +3 lines, -2 lines 0 comments Download
M sync/syncable/directory_change_delegate.h View 2 chunks +3 lines, -2 lines 0 comments Download
M sync/syncable/entry.h View 2 chunks +3 lines, -2 lines 0 comments Download
M sync/syncable/entry_kernel.h View 3 chunks +3 lines, -2 lines 0 comments Download
M sync/syncable/in_memory_directory_backing_store.h View 1 2 3 4 3 chunks +7 lines, -2 lines 0 comments Download
M sync/syncable/invalid_directory_backing_store.h View 2 chunks +4 lines, -2 lines 0 comments Download
M sync/syncable/mutable_entry.h View 2 chunks +3 lines, -2 lines 0 comments Download
M sync/syncable/nigori_handler.h View 2 chunks +3 lines, -2 lines 0 comments Download
M sync/syncable/nigori_util.h View 5 chunks +11 lines, -8 lines 0 comments Download
M sync/syncable/on_disk_directory_backing_store.h View 1 2 3 4 4 chunks +6 lines, -2 lines 0 comments Download
M sync/syncable/syncable_base_transaction.h View 2 chunks +2 lines, -1 line 0 comments Download
M sync/syncable/syncable_enum_conversions.h View 3 chunks +17 lines, -13 lines 0 comments Download
M sync/syncable/syncable_id.h View 5 chunks +7 lines, -5 lines 0 comments Download
M sync/syncable/syncable_proto_util.h View 3 chunks +4 lines, -2 lines 0 comments Download
M sync/syncable/syncable_read_transaction.h View 2 chunks +2 lines, -1 line 0 comments Download
M sync/syncable/syncable_util.h View 1 3 chunks +11 lines, -8 lines 0 comments Download
M sync/syncable/syncable_write_transaction.h View 1 chunk +1 line, -1 line 0 comments Download
M sync/syncable/transaction_observer.h View 1 chunk +3 lines, -2 lines 0 comments Download
M sync/util/cryptographer.h View 1 chunk +1 line, -1 line 0 comments Download
M sync/util/data_encryption_win.h View 2 chunks +5 lines, -3 lines 0 comments Download
M sync/util/get_session_name.h View 1 chunk +1 line, -1 line 0 comments Download
M sync/util/time.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 12 (0 generated)
Raghu Simha
Richard, please review. Thanks!
8 years ago (2012-12-22 01:25:52 UTC) #1
rlarocque
https://codereview.chromium.org/11624037/diff/9001/sync/internal_api/public/util/weak_handle.h File sync/internal_api/public/util/weak_handle.h (left): https://codereview.chromium.org/11624037/diff/9001/sync/internal_api/public/util/weak_handle.h#oldcode112 sync/internal_api/public/util/weak_handle.h:112: ~WeakHandleCoreBase(); Come to think of it, why is this ...
8 years ago (2012-12-22 02:00:49 UTC) #2
Raghu Simha
Richard, feedback addressed. PTAL. +akalin as backup reviewer, in case Richard isn't able to get ...
8 years ago (2012-12-22 02:25:02 UTC) #3
Raghu Simha
Fred, roping you in as main reviewer since Richard is on vacation this week. I ...
7 years, 12 months ago (2012-12-26 08:02:38 UTC) #4
akalin
https://codereview.chromium.org/11624037/diff/9001/sync/internal_api/public/util/weak_handle.h File sync/internal_api/public/util/weak_handle.h (left): https://codereview.chromium.org/11624037/diff/9001/sync/internal_api/public/util/weak_handle.h#oldcode112 sync/internal_api/public/util/weak_handle.h:112: ~WeakHandleCoreBase(); On 2012/12/22 02:25:02, rsimha wrote: > On 2012/12/22 ...
7 years, 12 months ago (2012-12-26 09:39:57 UTC) #5
Raghu Simha
Fred, PTAL. Thanks. On 2012/12/26 09:39:57, akalin wrote: > This non-virtual on purpose. The inheritance ...
7 years, 12 months ago (2012-12-27 01:07:35 UTC) #6
Raghu Simha
On 2012/12/27 01:07:35, rsimha wrote: > I wasn't exporting WeakHandleCoreBase merely due to linker warnings. ...
7 years, 12 months ago (2012-12-27 01:50:18 UTC) #7
Raghu Simha
On 2012/12/27 01:50:18, rsimha wrote: > I'll check to see if there's something else I'm ...
7 years, 12 months ago (2012-12-27 02:25:01 UTC) #8
akalin
I'm okay with exporting WeakHandleCoreBase. I'd have to think about it a bit more, but ...
7 years, 12 months ago (2012-12-27 07:14:42 UTC) #9
akalin
If there's no good reason to make ~AckHandle() and ~Invalidation() virtual and stuff works when ...
7 years, 12 months ago (2012-12-27 19:48:52 UTC) #10
Raghu Simha
https://codereview.chromium.org/11624037/diff/24001/sync/engine/apply_updates_and_resolve_conflicts_command.h File sync/engine/apply_updates_and_resolve_conflicts_command.h (right): https://codereview.chromium.org/11624037/diff/24001/sync/engine/apply_updates_and_resolve_conflicts_command.h#newcode17 sync/engine/apply_updates_and_resolve_conflicts_command.h:17: friend class ApplyUpdatesAndResolveConflictsCommandTest; On 2012/12/27 19:48:52, akalin wrote: > ...
7 years, 11 months ago (2013-01-02 06:49:24 UTC) #11
akalin
7 years, 11 months ago (2013-01-02 07:07:52 UTC) #12
LGTM!

On 2013/01/02 06:49:24, rsimha wrote:
>
https://codereview.chromium.org/11624037/diff/24001/sync/engine/apply_updates...
> File sync/engine/apply_updates_and_resolve_conflicts_command.h (right):
> 
>
https://codereview.chromium.org/11624037/diff/24001/sync/engine/apply_updates...
> sync/engine/apply_updates_and_resolve_conflicts_command.h:17: friend class
> ApplyUpdatesAndResolveConflictsCommandTest;
> On 2012/12/27 19:48:52, akalin wrote:
> > out of curiosity, why did this end up being needed?  Did it have to do with
> > SYNC_EXPORT_PRIVATE?
> 
> Good question. Turns out it isn't necessary after all. I must've added it
while
> trying to fix some errors and not removed it after that. Removed now.
> 
>
https://codereview.chromium.org/11624037/diff/24001/sync/internal_api/public/...
> File sync/internal_api/public/base/invalidation.h (right):
> 
>
https://codereview.chromium.org/11624037/diff/24001/sync/internal_api/public/...
> sync/internal_api/public/base/invalidation.h:35: virtual ~AckHandle();
> On 2012/12/27 19:48:52, akalin wrote:
> > hunh, why is this necessary?  Nothing inherits from AckHandle, right?
> 
> You're right that the destructors don't have to be virtual. However, not
adding
> them at all results in a LNK2005 (multiply defined symbol) error because the
> compiler automatically defines the destructors in the components that include
> this header. I've made the destructor non-virtual.
> 
>
https://codereview.chromium.org/11624037/diff/24001/sync/internal_api/public/...
> sync/internal_api/public/base/invalidation.h:52: virtual ~Invalidation();
> On 2012/12/27 19:48:52, akalin wrote:
> > here, too
> 
> Made this non-virtual too.
> 
>
https://codereview.chromium.org/11624037/diff/24001/sync/internal_api/public/...
> File sync/internal_api/public/http_bridge.h (right):
> 
>
https://codereview.chromium.org/11624037/diff/24001/sync/internal_api/public/...
> sync/internal_api/public/http_bridge.h:125: net::URLRequestContextGetter*
> GetRequestContextGetter() const;
> On 2012/12/27 19:48:52, akalin wrote:
> > Append ForTest()
> 
> Done.

Powered by Google App Engine
This is Rietveld 408576698