本文整理汇总了C++中nsAutoPtr::GetDatabaseLocation方法的典型用法代码示例。如果您正苦于以下问题:C++ nsAutoPtr::GetDatabaseLocation方法的具体用法?C++ nsAutoPtr::GetDatabaseLocation怎么用?C++ nsAutoPtr::GetDatabaseLocation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nsAutoPtr
的用法示例。
在下文中一共展示了nsAutoPtr::GetDatabaseLocation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RemovePrefBranch
/* static */ PLDHashOperator PR_CALLBACK
sbLocalDatabaseLibraryLoader::VerifyEntriesCallback(nsUint32HashKey::KeyType aKey,
nsAutoPtr<sbLibraryLoaderInfo>& aEntry,
void* aUserData)
{
nsCAutoString prefBranch;
aEntry->GetPrefBranch(prefBranch);
NS_ASSERTION(!prefBranch.IsEmpty(), "This can't be empty!");
nsAutoString databaseGUID;
aEntry->GetDatabaseGUID(databaseGUID);
if (databaseGUID.IsEmpty()) {
NS_WARNING("One of the libraries was missing a database GUID and will be removed.");
RemovePrefBranch(prefBranch);
return PL_DHASH_REMOVE;
}
nsAutoString resourceGUID;
aEntry->GetResourceGUID(resourceGUID);
if (resourceGUID.IsEmpty()) {
NS_WARNING("One of the libraries was missing a resource GUID and will be removed.");
RemovePrefBranch(prefBranch);
return PL_DHASH_REMOVE;
}
nsCOMPtr<nsILocalFile> location = aEntry->GetDatabaseLocation();
if (!location) {
NS_WARNING("One of the libraries had no location and will be removed.");
RemovePrefBranch(prefBranch);
return PL_DHASH_REMOVE;
}
return PL_DHASH_NEXT;
}