DescriptionDevice 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 #
Messages
Total messages: 9 (2 generated)
|