1
0
Fork 0

Revert "Closes #919: Enable bookmarks synchronization"

This reverts commit b854cccefa.
master
Grisha Kruglov 2019-04-23 13:53:47 -07:00 committed by Colin Lee
parent 2162e74f76
commit d1c1270e68
2 changed files with 3 additions and 7 deletions

View File

@ -8,7 +8,6 @@ import android.content.Context
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import mozilla.components.browser.storage.sync.PlacesBookmarksStorage
import mozilla.components.browser.storage.sync.PlacesHistoryStorage
import mozilla.components.feature.sync.BackgroundSyncManager
import mozilla.components.feature.sync.GlobalSyncableStoreProvider
@ -21,8 +20,7 @@ import mozilla.components.service.fxa.FxaAccountManager
*/
class BackgroundServices(
context: Context,
historyStorage: PlacesHistoryStorage,
bookmarkStorage: PlacesBookmarksStorage
historyStorage: PlacesHistoryStorage
) {
companion object {
const val CLIENT_ID = "a2270f727f45f648"
@ -37,14 +35,12 @@ class BackgroundServices(
private val config = Config.release(CLIENT_ID, REDIRECT_URL)
init {
// Make the "history" and "bookmark" stores accessible to workers spawned by the sync manager.
// Make the "history" store accessible to workers spawned by the sync manager.
GlobalSyncableStoreProvider.configureStore("history" to historyStorage)
GlobalSyncableStoreProvider.configureStore("bookmarks" to bookmarkStorage)
}
val syncManager = BackgroundSyncManager("https://identity.mozilla.com/apps/oldsync").also {
it.addStore("history")
it.addStore("bookmarks")
}
val accountManager = FxaAccountManager(context, config, scopes, syncManager).also {

View File

@ -10,7 +10,7 @@ import android.content.Context
* Provides access to all components.
*/
class Components(private val context: Context) {
val backgroundServices by lazy { BackgroundServices(context, core.historyStorage, core.bookmarksStorage) }
val backgroundServices by lazy { BackgroundServices(context, core.historyStorage) }
val services by lazy { Services(backgroundServices.accountManager, useCases.tabsUseCases) }
val core by lazy { Core(context) }
val search by lazy { Search(context) }