org.chromium.chrome.browser.identity.UniqueIdentificationGeneratorFactory Java Examples
The following examples show how to use
org.chromium.chrome.browser.identity.UniqueIdentificationGeneratorFactory.
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: SyncController.java From delion with Apache License 2.0 | 5 votes |
/** * Set the sessions ID using the generator that was registered for GENERATOR_ID. */ private void setSessionsId() { UniqueIdentificationGenerator generator = UniqueIdentificationGeneratorFactory.getInstance(GENERATOR_ID); String uniqueTag = generator.getUniqueId(null); if (uniqueTag.isEmpty()) { Log.e(TAG, "Unable to get unique tag for sync. " + "This may lead to unexpected tab sync behavior."); return; } mProfileSyncService.setSessionsId(SESSION_TAG_PREFIX + uniqueTag); }
Example #2
Source File: SyncController.java From AndroidChromium with Apache License 2.0 | 5 votes |
/** * Set the sessions ID using the generator that was registered for GENERATOR_ID. */ private void setSessionsId() { UniqueIdentificationGenerator generator = UniqueIdentificationGeneratorFactory.getInstance(GENERATOR_ID); String uniqueTag = generator.getUniqueId(null); if (uniqueTag.isEmpty()) { Log.e(TAG, "Unable to get unique tag for sync. " + "This may lead to unexpected tab sync behavior."); return; } mProfileSyncService.setSessionsId(SESSION_TAG_PREFIX + uniqueTag); }
Example #3
Source File: SyncController.java From 365browser with Apache License 2.0 | 5 votes |
/** * Set the sessions ID using the generator that was registered for GENERATOR_ID. */ private void setSessionsId() { UniqueIdentificationGenerator generator = UniqueIdentificationGeneratorFactory.getInstance(GENERATOR_ID); String uniqueTag = generator.getUniqueId(null); if (uniqueTag.isEmpty()) { Log.e(TAG, "Unable to get unique tag for sync. " + "This may lead to unexpected tab sync behavior."); return; } mProfileSyncService.setSessionsId(SESSION_TAG_PREFIX + uniqueTag); }
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)); }