本文整理汇总了Java中org.chromium.chrome.browser.identity.UuidBasedUniqueIdentificationGenerator类的典型用法代码示例。如果您正苦于以下问题:Java UuidBasedUniqueIdentificationGenerator类的具体用法?Java UuidBasedUniqueIdentificationGenerator怎么用?Java UuidBasedUniqueIdentificationGenerator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UuidBasedUniqueIdentificationGenerator类属于org.chromium.chrome.browser.identity包,在下文中一共展示了UuidBasedUniqueIdentificationGenerator类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: doInitializeAndInstallGenerator
import org.chromium.chrome.browser.identity.UuidBasedUniqueIdentificationGenerator; //导入依赖的package包/类
/**
* 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);
}
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:13,代码来源:UniqueIdInvalidationClientNameGenerator.java
示例2: onCreate
import org.chromium.chrome.browser.identity.UuidBasedUniqueIdentificationGenerator; //导入依赖的package包/类
/**
* This is called once per ChromeApplication instance, which get created per process
* (browser OR renderer). Don't stick anything in here that shouldn't be called multiple times
* during Chrome's lifetime.
*/
@Override
public void onCreate() {
UmaUtils.recordMainEntryPointTime();
super.onCreate();
UiUtils.setKeyboardShowingDelegate(new UiUtils.KeyboardShowingDelegate() {
@Override
public boolean disableKeyboardCheck(Context context, View view) {
Activity activity = null;
if (context instanceof Activity) {
activity = (Activity) context;
} else if (view != null && view.getContext() instanceof Activity) {
activity = (Activity) view.getContext();
}
// For multiwindow mode we do not track keyboard visibility.
return activity != null && MultiWindowUtils.getInstance().isMultiWindow(activity);
}
});
// Initialize the AccountManagerHelper with the correct AccountManagerDelegate. Must be done
// only once and before AccountMangerHelper.get(...) is called to avoid using the
// default AccountManagerDelegate.
AccountManagerHelper.initializeAccountManagerHelper(this, createAccountManagerDelegate());
// Set the unique identification generator for invalidations. The
// invalidations system can start and attempt to fetch the client ID
// very early. We need this generator to be ready before that happens.
UniqueIdInvalidationClientNameGenerator.doInitializeAndInstallGenerator(this);
// Set minimum Tango log level. This sets an in-memory static field, and needs to be
// set in the ApplicationContext instead of an activity, since Tango can be woken up
// by the system directly though messages from GCM.
AndroidLogger.setMinimumAndroidLogLevel(Log.WARN);
// Set up the identification generator for sync. The ID is actually generated
// in the SyncController constructor.
UniqueIdentificationGeneratorFactory.registerGenerator(SyncController.GENERATOR_ID,
new UuidBasedUniqueIdentificationGenerator(this, SESSIONS_UUID_PREF_KEY), false);
}
开发者ID:Smalinuxer,项目名称:Vafrinn,代码行数:45,代码来源:ChromeApplication.java
示例3: setupSessionSyncId
import org.chromium.chrome.browser.identity.UuidBasedUniqueIdentificationGenerator; //导入依赖的package包/类
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));
}
开发者ID:morristech,项目名称:android-chromium,代码行数:13,代码来源:SyncController.java
示例4: handlePreNativeInitialization
import org.chromium.chrome.browser.identity.UuidBasedUniqueIdentificationGenerator; //导入依赖的package包/类
/**
* Performs the shared class initialization.
*/
protected void handlePreNativeInitialization() {
ChromeApplication application = (ChromeApplication) ContextUtils.getApplicationContext();
UiUtils.setKeyboardShowingDelegate(new UiUtils.KeyboardShowingDelegate() {
@Override
public boolean disableKeyboardCheck(Context context, View view) {
Activity activity = null;
if (context instanceof Activity) {
activity = (Activity) context;
} else if (view != null && view.getContext() instanceof Activity) {
activity = (Activity) view.getContext();
}
// For multiwindow mode we do not track keyboard visibility.
return activity != null
&& MultiWindowUtils.getInstance().isLegacyMultiWindow(activity);
}
});
// Initialize the AccountManagerHelper with the correct AccountManagerDelegate. Must be done
// only once and before AccountMangerHelper.get(...) is called to avoid using the
// default AccountManagerDelegate.
AccountManagerHelper.initializeAccountManagerHelper(
application, application.createAccountManagerDelegate());
// Set the unique identification generator for invalidations. The
// invalidations system can start and attempt to fetch the client ID
// very early. We need this generator to be ready before that happens.
UniqueIdInvalidationClientNameGenerator.doInitializeAndInstallGenerator(application);
// Set minimum Tango log level. This sets an in-memory static field, and needs to be
// set in the ApplicationContext instead of an activity, since Tango can be woken up
// by the system directly though messages from GCM.
AndroidLogger.setMinimumAndroidLogLevel(Log.WARN);
// Set up the identification generator for sync. The ID is actually generated
// in the SyncController constructor.
UniqueIdentificationGeneratorFactory.registerGenerator(SyncController.GENERATOR_ID,
new UuidBasedUniqueIdentificationGenerator(
application, SESSIONS_UUID_PREF_KEY), false);
}
开发者ID:JackyAndroid,项目名称:AndroidChromium,代码行数:45,代码来源:ProcessInitializationHandler.java
示例5: handlePreNativeInitialization
import org.chromium.chrome.browser.identity.UuidBasedUniqueIdentificationGenerator; //导入依赖的package包/类
/**
* Performs the shared class initialization.
*/
protected void handlePreNativeInitialization() {
ChromeApplication application = (ChromeApplication) ContextUtils.getApplicationContext();
UiUtils.setKeyboardShowingDelegate(new UiUtils.KeyboardShowingDelegate() {
@Override
public boolean disableKeyboardCheck(Context context, View view) {
Activity activity = null;
if (context instanceof Activity) {
activity = (Activity) context;
} else if (view != null && view.getContext() instanceof Activity) {
activity = (Activity) view.getContext();
}
// For multiwindow mode we do not track keyboard visibility.
return activity != null
&& MultiWindowUtils.getInstance().isLegacyMultiWindow(activity);
}
});
// Initialize the AccountManagerHelper with the correct AccountManagerDelegate. Must be done
// only once and before AccountMangerHelper.get(...) is called to avoid using the
// default AccountManagerDelegate.
AccountManagerHelper.initializeAccountManagerHelper(
AppHooks.get().createAccountManagerDelegate());
// Set the unique identification generator for invalidations. The
// invalidations system can start and attempt to fetch the client ID
// very early. We need this generator to be ready before that happens.
UniqueIdInvalidationClientNameGenerator.doInitializeAndInstallGenerator(application);
// Set minimum Tango log level. This sets an in-memory static field, and needs to be
// set in the ApplicationContext instead of an activity, since Tango can be woken up
// by the system directly though messages from GCM.
AndroidLogger.setMinimumAndroidLogLevel(Log.WARN);
// Set up the identification generator for sync. The ID is actually generated
// in the SyncController constructor.
UniqueIdentificationGeneratorFactory.registerGenerator(SyncController.GENERATOR_ID,
new UuidBasedUniqueIdentificationGenerator(
application, SESSIONS_UUID_PREF_KEY), false);
// Indicate that we can use the GMS location provider.
LocationProviderFactory.useGmsCoreLocationProvider();
}
开发者ID:mogoweb,项目名称:365browser,代码行数:48,代码来源:ProcessInitializationHandler.java
注:本文中的org.chromium.chrome.browser.identity.UuidBasedUniqueIdentificationGenerator类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论