2019-02-15 23:44:43 +01:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
package org.mozilla.fenix.components
|
|
|
|
|
2019-05-08 18:04:06 +02:00
|
|
|
import mozilla.components.service.fxa.manager.FxaAccountManager
|
2019-06-05 00:57:24 +02:00
|
|
|
import org.mozilla.fenix.components.features.FirefoxAccountsAuthFeature
|
2019-05-07 23:36:37 +02:00
|
|
|
import org.mozilla.fenix.test.Mockable
|
2019-02-15 23:44:43 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Component group which encapsulates foreground-friendly services.
|
|
|
|
*/
|
2019-05-07 23:36:37 +02:00
|
|
|
@Mockable
|
2019-02-15 23:44:43 +01:00
|
|
|
class Services(
|
2019-06-05 00:57:24 +02:00
|
|
|
private val accountManager: FxaAccountManager
|
2019-02-15 23:44:43 +01:00
|
|
|
) {
|
|
|
|
val accountsAuthFeature by lazy {
|
|
|
|
FirefoxAccountsAuthFeature(
|
|
|
|
accountManager,
|
2019-04-12 20:34:16 +02:00
|
|
|
redirectUrl = BackgroundServices.REDIRECT_URL
|
2019-02-15 23:44:43 +01:00
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|