org.chromium.chrome.browser.identity.UuidBasedUniqueIdentificationGenerator Java Examples
The following examples show how to use
org.chromium.chrome.browser.identity.UuidBasedUniqueIdentificationGenerator.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: UniqueIdInvalidationClientNameGenerator.java From delion with Apache License 2.0 | 5 votes |
/** * 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); }
Example #2
Source File: UniqueIdInvalidationClientNameGenerator.java From AndroidChromium with Apache License 2.0 | 5 votes |
/** * 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); }
Example #3
Source File: UniqueIdInvalidationClientNameGenerator.java From 365browser with Apache License 2.0 | 5 votes |
/** * 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); }
Example #4
Source File: SyncController.java From android-chromium with BSD 2-Clause "Simplified" License | 5 votes |
private void setupSessionSyncId() { // Ensure that sync uses the correct UniqueIdentificationGenerator, but do not force the // registration, in case a test case has already overridden it. UuidBasedUniqueIdentificationGenerator generator = new UuidBasedUniqueIdentificationGenerator(mContext, SESSIONS_UUID_PREF_KEY); UniqueIdentificationGeneratorFactory.registerGenerator( UuidBasedUniqueIdentificationGenerator.GENERATOR_ID, generator, false); // Since we do not override the UniqueIdentificationGenerator, we get it from the factory, // instead of using the instance we just created. mProfileSyncService.setSessionsId(UniqueIdentificationGeneratorFactory .getInstance(UuidBasedUniqueIdentificationGenerator.GENERATOR_ID)); }
Example #5
Source File: SyncController.java From android-chromium with BSD 2-Clause "Simplified" License | 5 votes |
private void setupSessionSyncId() { // Ensure that sync uses the correct UniqueIdentificationGenerator, but do not force the // registration, in case a test case has already overridden it. UuidBasedUniqueIdentificationGenerator generator = new UuidBasedUniqueIdentificationGenerator(mContext, SESSIONS_UUID_PREF_KEY); UniqueIdentificationGeneratorFactory.registerGenerator( UuidBasedUniqueIdentificationGenerator.GENERATOR_ID, generator, false); // Since we do not override the UniqueIdentificationGenerator, we get it from the factory, // instead of using the instance we just created. mProfileSyncService.setSessionsId(UniqueIdentificationGeneratorFactory .getInstance(UuidBasedUniqueIdentificationGenerator.GENERATOR_ID)); }