Search in sources :

Example 1 with InvalidationClientNameGenerator

use of org.chromium.components.sync.notifier.InvalidationClientNameGenerator in project AndroidChromium by JackyAndroid.

the class UniqueIdInvalidationClientNameGenerator method doInitializeAndInstallGenerator.

/**
     * Called during early init to make this InvalidationClientNameGenerator the default.
     *
     * This should be called very early during initialization to setup the invalidaiton client name.
     */
public static void doInitializeAndInstallGenerator(Context context) {
    UniqueIdentificationGenerator idGenerator = new UuidBasedUniqueIdentificationGenerator(context, INVALIDATIONS_UUID_PREF_KEY);
    InvalidationClientNameGenerator clientNameGenerator = new UniqueIdInvalidationClientNameGenerator(idGenerator);
    InvalidationClientNameProvider.get().setPreferredClientNameGenerator(clientNameGenerator);
}
Also used : InvalidationClientNameGenerator(org.chromium.components.sync.notifier.InvalidationClientNameGenerator) UuidBasedUniqueIdentificationGenerator(org.chromium.chrome.browser.identity.UuidBasedUniqueIdentificationGenerator) UuidBasedUniqueIdentificationGenerator(org.chromium.chrome.browser.identity.UuidBasedUniqueIdentificationGenerator) UniqueIdentificationGenerator(org.chromium.chrome.browser.identity.UniqueIdentificationGenerator)

Aggregations

UniqueIdentificationGenerator (org.chromium.chrome.browser.identity.UniqueIdentificationGenerator)1 UuidBasedUniqueIdentificationGenerator (org.chromium.chrome.browser.identity.UuidBasedUniqueIdentificationGenerator)1 InvalidationClientNameGenerator (org.chromium.components.sync.notifier.InvalidationClientNameGenerator)1