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

Issue 10911073: NOT FOR COMMIT: Add DeviceInfo type and ChangeProcessor (Closed)

Created:
8 years, 3 months ago by rlarocque
Modified:
8 years, 1 month ago
CC:
chromium-reviews, albertb
Visibility:
Public.

Description

Sync: Add DeviceInfo type and ChangeProcessor This change adds a new type to sync. It is the first new type to make use of the "control type" infrastructure added in r154522. Each client owns exactly one node of type DEVICE_INFO. The node is identified in part by a UNIQUE_CLIENT_TAG that includes the client's cache_guid. Each client will create and update its node with its current version, platform, and other metadata that could help a user identify the device. This data type replaces the device information fields that used to be contained in the nigori node. Also included in this commit: - A first attempt at a ChangeProcessor for this type. The SyncedDeviceTracker should eventually be extended to allow other components to receive notifications when new device info is available. - Tests for the SyncedDeviceTracker. - These tests introduce and make use of MockTransactionObserver. It implements the TransactionObserver interface and can maintain a count of emitted transaction notifications. - A change to the signature of ProfileSyncServiceTestHelper::CreateRoot() and all of its callers to remove the need for a TestIdFactory instance BUG=122825

Patch Set 1 #

Patch Set 2 : Transition from internal_api to syncable #

Patch Set 3 : Introduce SyncedDeviceTracker (the ChangeProcessor) #

Total comments: 68

Patch Set 4 : Rebase #

Patch Set 5 : Fixes from review comments #

Total comments: 39

Patch Set 6 : Add DeviceInfo class. Some other TODOs still remain. #

Patch Set 7 : More fixes #

Total comments: 10

Patch Set 8 : Fix several issues #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1003 lines, -361 lines) Patch
M chrome/browser/sync/abstract_profile_sync_service_test.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/sync/abstract_profile_sync_service_test.cc View 1 2 3 4 5 6 7 3 chunks +3 lines, -39 lines 0 comments Download
M chrome/browser/sync/glue/DEPS View 1 2 3 4 5 6 7 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/sync/glue/change_processor.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
A chrome/browser/sync/glue/device_info.h View 1 2 3 4 5 6 7 1 chunk +54 lines, -0 lines 0 comments Download
A chrome/browser/sync/glue/device_info.cc View 1 2 3 4 5 6 7 1 chunk +120 lines, -0 lines 0 comments Download
M chrome/browser/sync/glue/model_association_manager.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/sync/glue/session_model_associator.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/sync/glue/session_model_associator.cc View 1 2 3 4 5 6 7 10 chunks +15 lines, -38 lines 0 comments Download
M chrome/browser/sync/glue/session_model_associator_unittest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/glue/sync_backend_host.h View 1 2 3 4 5 6 7 4 chunks +22 lines, -12 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host.cc View 1 2 3 4 5 6 7 14 chunks +72 lines, -56 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host_unittest.cc View 1 2 3 4 5 6 7 3 chunks +13 lines, -0 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_registrar.cc View 1 2 3 4 5 6 7 5 chunks +10 lines, -9 lines 0 comments Download
A chrome/browser/sync/glue/synced_device_tracker.h View 1 2 3 4 5 6 7 1 chunk +55 lines, -0 lines 0 comments Download
A chrome/browser/sync/glue/synced_device_tracker.cc View 1 2 3 4 5 6 7 1 chunk +126 lines, -0 lines 0 comments Download
A chrome/browser/sync/glue/synced_device_tracker_unittest.cc View 1 2 3 4 5 6 7 1 chunk +141 lines, -0 lines 0 comments Download
M chrome/browser/sync/profile_sync_service.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/profile_sync_service_bookmark_unittest.cc View 1 2 3 4 5 6 7 4 chunks +4 lines, -12 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_session_unittest.cc View 1 2 3 4 5 6 7 6 chunks +5 lines, -8 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_unittest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/sync_prefs_unittest.cc View 5 chunks +14 lines, -21 lines 0 comments Download
M chrome/browser/sync/test_profile_sync_service.cc View 1 2 3 4 5 6 7 3 chunks +9 lines, -4 lines 0 comments Download
M chrome/browser/sync/user_selectable_sync_type.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 2 chunks +5 lines, -1 line 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M sync/internal_api/base_node.cc View 2 1 chunk +5 lines, -0 lines 0 comments Download
M sync/internal_api/base_transaction.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -4 lines 0 comments Download
M sync/internal_api/public/base/model_type.h View 1 chunk +3 lines, -1 line 0 comments Download
M sync/internal_api/public/base_node.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M sync/internal_api/public/base_transaction.h View 1 2 3 4 5 6 7 1 chunk +11 lines, -3 lines 0 comments Download
M sync/internal_api/public/sync_manager.h View 1 2 2 chunks +0 lines, -3 lines 0 comments Download
M sync/internal_api/public/test/fake_sync_manager.h View 1 2 3 4 5 6 7 3 chunks +3 lines, -1 line 0 comments Download
M sync/internal_api/public/test/test_user_share.h View 1 2 3 4 5 6 7 2 chunks +14 lines, -1 line 0 comments Download
M sync/internal_api/public/user_share.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M sync/internal_api/public/write_node.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M sync/internal_api/sync_manager_impl.h View 1 2 3 4 3 chunks +1 line, -13 lines 0 comments Download
M sync/internal_api/sync_manager_impl.cc View 1 2 3 4 chunks +0 lines, -52 lines 0 comments Download
M sync/internal_api/sync_manager_impl_unittest.cc View 1 2 3 4 3 chunks +2 lines, -2 lines 0 comments Download
M sync/internal_api/test/fake_sync_manager.cc View 1 2 3 4 5 6 7 5 chunks +21 lines, -2 lines 0 comments Download
M sync/internal_api/test/test_user_share.cc View 1 2 3 4 5 6 7 2 chunks +34 lines, -0 lines 0 comments Download
M sync/internal_api/user_share.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M sync/internal_api/write_node.cc View 2 1 chunk +7 lines, -0 lines 0 comments Download
A sync/protocol/device_info_specifics.proto View 1 2 3 4 5 6 7 1 chunk +34 lines, -0 lines 0 comments Download
M sync/protocol/nigori_specifics.proto View 1 2 3 4 2 chunks +2 lines, -19 lines 0 comments Download
M sync/protocol/proto_enum_conversions.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M sync/protocol/proto_enum_conversions.cc View 1 2 3 4 1 chunk +9 lines, -9 lines 0 comments Download
M sync/protocol/proto_value_conversions.h View 1 2 3 4 3 chunks +4 lines, -5 lines 0 comments Download
M sync/protocol/proto_value_conversions.cc View 1 2 3 4 5 6 7 3 chunks +6 lines, -6 lines 0 comments Download
M sync/protocol/proto_value_conversions_unittest.cc View 4 chunks +7 lines, -1 line 0 comments Download
M sync/protocol/session_specifics.proto View 1 2 3 4 1 chunk +1 line, -10 lines 0 comments Download
M sync/protocol/sync.proto View 1 2 3 2 chunks +7 lines, -5 lines 0 comments Download
M sync/protocol/sync_enums.proto View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
M sync/protocol/sync_proto.gyp View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M sync/sync.gyp View 1 2 3 2 chunks +3 lines, -1 line 0 comments Download
M sync/syncable/model_type.cc View 9 chunks +22 lines, -0 lines 0 comments Download
M sync/test/engine/test_directory_setter_upper.h View 1 2 3 4 5 6 2 chunks +8 lines, -2 lines 0 comments Download
M sync/test/engine/test_directory_setter_upper.cc View 1 2 3 4 5 6 2 chunks +8 lines, -4 lines 0 comments Download
A sync/test/mock_transaction_observer.h View 1 2 3 4 5 6 1 chunk +45 lines, -0 lines 0 comments Download
A sync/test/mock_transaction_observer.cc View 1 2 3 4 1 chunk +30 lines, -0 lines 0 comments Download
M sync/tools/sync_client.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M sync/util/data_type_histogram.h View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
rlarocque
Here's the first attempt at adding the DEVICE_INFO type. I'm probably breaking a few sync ...
8 years, 3 months ago (2012-09-04 21:01:39 UTC) #1
Nicolas Zea
I might be forgetting the discussion, but why is this implemented at the syncable level ...
8 years, 3 months ago (2012-09-05 01:07:02 UTC) #2
rlarocque
Here's the first draft of a ChangeProcessor implementation for DEVICE_INFO. It turned out much better ...
8 years, 3 months ago (2012-09-08 01:20:44 UTC) #3
Nicolas Zea
http://codereview.chromium.org/10911073/diff/6002/chrome/browser/sync/glue/synced_device_tracker.cc File chrome/browser/sync/glue/synced_device_tracker.cc (right): http://codereview.chromium.org/10911073/diff/6002/chrome/browser/sync/glue/synced_device_tracker.cc#newcode44 chrome/browser/sync/glue/synced_device_tracker.cc:44: std::string DeviceInfoLookupString(const std::string& cache_guid) { nit: I find it ...
8 years, 3 months ago (2012-09-13 00:45:55 UTC) #4
Raz Mathias
http://codereview.chromium.org/10911073/diff/6002/sync/protocol/device_info_specifics.proto File sync/protocol/device_info_specifics.proto (right): http://codereview.chromium.org/10911073/diff/6002/sync/protocol/device_info_specifics.proto#newcode26 sync/protocol/device_info_specifics.proto:26: optional string name = 2; Is this field for ...
8 years, 3 months ago (2012-09-13 16:07:01 UTC) #5
rlarocque
I've updated the patch to address some review comments. I was hoping to avoid properly ...
8 years, 3 months ago (2012-09-14 01:03:07 UTC) #6
Nicolas Zea
http://codereview.chromium.org/10911073/diff/13002/chrome/browser/sync/glue/DEPS File chrome/browser/sync/glue/DEPS (right): http://codereview.chromium.org/10911073/diff/13002/chrome/browser/sync/glue/DEPS#newcode8 chrome/browser/sync/glue/DEPS:8: "+sync/test", Could the mock transaction observer (at least the ...
8 years, 3 months ago (2012-09-14 19:15:08 UTC) #7
rlarocque
The latest upload addresses a few more comments. I'm still struggling to find a good ...
8 years, 3 months ago (2012-09-15 01:36:37 UTC) #8
Nicolas Zea
http://codereview.chromium.org/10911073/diff/13002/chrome/browser/sync/glue/DEPS File chrome/browser/sync/glue/DEPS (right): http://codereview.chromium.org/10911073/diff/13002/chrome/browser/sync/glue/DEPS#newcode8 chrome/browser/sync/glue/DEPS:8: "+sync/test", On 2012/09/15 01:36:37, rlarocque wrote: > On 2012/09/14 ...
8 years, 3 months ago (2012-09-17 17:54:00 UTC) #9
rlarocque
The latest patch adds: - UserShare::cache_guid(), which allowed me to remove most of the dependencies ...
8 years, 3 months ago (2012-09-19 21:37:58 UTC) #10
rlarocque
http://codereview.chromium.org/10911073/diff/13010/chrome/browser/sync/glue/device_info.h File chrome/browser/sync/glue/device_info.h (right): http://codereview.chromium.org/10911073/diff/13010/chrome/browser/sync/glue/device_info.h#newcode30 chrome/browser/sync/glue/device_info.h:30: // Compares this objects fields with another. On 2012/09/17 ...
8 years, 3 months ago (2012-09-19 23:03:08 UTC) #11
rlarocque
8 years, 1 month ago (2012-11-15 01:06:36 UTC) #12
I'm closing this review.  

The first half of this has been committed, and the second half is now up for
review at http://codereview.chromium.org/11360259/.

Powered by Google App Engine
This is Rietveld 408576698