return false;
}
- if (old_application->Version()->CompareTo(
+ if (
+#if defined(OS_TIZEN)
+ // For Tizen WGT package, downgrade to a lower version or reinstall
+ // is permitted when using Tizen WRT, Crosswalk runtime need to follow
+ // this behavior on Tizen platform.
+ package->type() != Package::WGT &&
+#endif
+ old_application->Version()->CompareTo(
*(new_application->Version())) >= 0) {
LOG(INFO) << "The version number of new XPK/WGT package "
"should be higher than "
result = false;
}
- content::StoragePartition* partition =
- content::BrowserContext::GetStoragePartitionForSite(
- runtime_context_, application->GetBaseURLFromApplicationId(id));
- partition->ClearDataForOrigin(
- content::StoragePartition::REMOVE_DATA_MASK_ALL,
- content::StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL,
- application->URL(),
- partition->GetURLRequestContext());
-
- base::FilePath path;
- PathService::Get(xwalk::DIR_WGT_STORAGE_PATH, &path);
- RemoveWidgetStorageFiles(path, id);
+ // Clear databases, the directory clean up will happen next time Crosswalk
+ // startup by ApplicationStorageImpl::CollectGarbageApplications.
+ content::BrowserContext::AsyncObliterateStoragePartition(
+ runtime_context_,
+ application->GetBaseURLFromApplicationId(id),
+ base::Bind(&base::DoNothing));
FOR_EACH_OBSERVER(Observer, observers_, OnApplicationUninstalled(id));