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

Issue 594643003: Device info datatype should be moved to components/sync_driver. (Closed)

Created:
6 years, 3 months ago by stanisc
Modified:
6 years, 3 months ago
CC:
chromium-reviews, tim+watch_chromium.org, haitaol+watch_chromium.org, pam+watch_chromium.org, zea+watch_chromium.org, maniscalco+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Device info datatype should be moved to components/sync_driver. This change prepares DeviceInfo class (and all other sync classes that depend on DeviceInfo and implement DEVICE_INFO syncable type) to be moved to components/sync_driver library by removing any dependencies on chrome/browser. To achieve this all chrome/browser specific code was moved to LocalDeviceInfoProviderImpl which will stay in browser/sync/glue. All other classes including DeviceInfo and LocalDeviceInfoProvider should now depend only on base or components. I'll move them to components/sync_driver in the next change. Details: 1) In ui_thread_search_terms_data.cc DeviceInfo::GetLocalDeviceType() was used just to find out if the device is an Android phone. Since this code has nothing to do with Sync I replaced these with direct calls to ui::GetDeviceFormFactor() - that exactly what DeviceInfo::GetLocalDeviceType() does internally. 2) In sessions_sync_manager.cc - calling DeviceInfo::GetLocalDeviceType() isn't necessary anymore because the local device type can be accessed via the owned LocalDeviceInfoProvider instance. This allowed me to move GetLocalDeviceType() to LocalDeviceInfoProviderImpl and make it private. 3) DeviceInfo::MakeUserAgentForSyncApi() is called only from the code that will stay in browser/sync/glue. I moved the implemented to LocalDeviceInfoProviderImpl class. BUG=396136 Committed: https://crrev.com/1052875a076568fc4232b506d19d1d029e9814e6 Cr-Commit-Position: refs/heads/master@{#296267}

Patch Set 1 #

Patch Set 2 : Fixed dependencies in ui_thread_search_terms_data.cc #

Total comments: 6

Patch Set 3 : Addressed CR feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+148 lines, -198 lines) Patch
M chrome/browser/search_engines/ui_thread_search_terms_data.cc View 1 2 4 chunks +4 lines, -9 lines 0 comments Download
M chrome/browser/sync/glue/device_info.h View 1 2 3 chunks +5 lines, -33 lines 0 comments Download
M chrome/browser/sync/glue/device_info.cc View 1 2 3 chunks +3 lines, -136 lines 0 comments Download
M chrome/browser/sync/glue/local_device_info_provider_impl.h View 1 2 chunks +13 lines, -1 line 0 comments Download
M chrome/browser/sync/glue/local_device_info_provider_impl.cc View 1 3 chunks +105 lines, -15 lines 0 comments Download
M chrome/browser/sync/glue/local_device_info_provider_unittest.cc View 1 2 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host_core.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/sessions/sessions_sync_manager.cc View 1 2 chunks +6 lines, -2 lines 0 comments Download

Messages

Total messages: 9 (2 generated)
stanisc
pkasting@chromium.org: Please review changes in chrome/browser/search_engines. maniscalco@chromium.org: Please review changes in chrome/browser/sync.
6 years, 3 months ago (2014-09-23 02:06:25 UTC) #2
Peter Kasting
LGTM https://codereview.chromium.org/594643003/diff/20001/chrome/browser/search_engines/ui_thread_search_terms_data.cc File chrome/browser/search_engines/ui_thread_search_terms_data.cc (right): https://codereview.chromium.org/594643003/diff/20001/chrome/browser/search_engines/ui_thread_search_terms_data.cc#newcode107 chrome/browser/search_engines/ui_thread_search_terms_data.cc:107: : "chrome-omni"; Nit: Please wrap the ?: like ...
6 years, 3 months ago (2014-09-23 04:06:31 UTC) #3
maniscalco
LGTM with a couple nits. Nice change description BTW. https://codereview.chromium.org/594643003/diff/20001/chrome/browser/sync/glue/device_info.cc File chrome/browser/sync/glue/device_info.cc (right): https://codereview.chromium.org/594643003/diff/20001/chrome/browser/sync/glue/device_info.cc#newcode117 chrome/browser/sync/glue/device_info.cc:117: ...
6 years, 3 months ago (2014-09-23 16:28:27 UTC) #4
stanisc
Addressed code review feedback. https://codereview.chromium.org/594643003/diff/20001/chrome/browser/search_engines/ui_thread_search_terms_data.cc File chrome/browser/search_engines/ui_thread_search_terms_data.cc (right): https://codereview.chromium.org/594643003/diff/20001/chrome/browser/search_engines/ui_thread_search_terms_data.cc#newcode107 chrome/browser/search_engines/ui_thread_search_terms_data.cc:107: : "chrome-omni"; On 2014/09/23 04:06:31, ...
6 years, 3 months ago (2014-09-23 21:30:33 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/594643003/40001
6 years, 3 months ago (2014-09-23 21:34:25 UTC) #7
commit-bot: I haz the power
Committed patchset #3 (id:40001) as 7667c7da392e5fffc39c4da09fa6ac4877832520
6 years, 3 months ago (2014-09-23 21:52:30 UTC) #8
commit-bot: I haz the power
6 years, 3 months ago (2014-09-23 21:52:55 UTC) #9
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/1052875a076568fc4232b506d19d1d029e9814e6
Cr-Commit-Position: refs/heads/master@{#296267}

Powered by Google App Engine
This is Rietveld 408576698