コード例 #1
0
ファイル: CreateFileTask.cpp プロジェクト: kapeels/gecko-dev
FileSystemResponseValue
CreateFileTask::GetSuccessRequestResult() const
{
  MOZ_ASSERT(NS_IsMainThread(), "Only call on main thread!");
  BlobParent* actor = GetBlobParent(mTargetBlobImpl);
  if (!actor) {
    return FileSystemErrorResponse(NS_ERROR_DOM_FILESYSTEM_UNKNOWN_ERR);
  }
  FileSystemFileResponse response;
  response.blobParent() = actor;
  return response;
}
コード例 #2
0
FileSystemResponseValue
GetFileOrDirectoryTask::GetSuccessRequestResult() const
{
    MOZ_ASSERT(NS_IsMainThread(), "Only call on main thread!");
    if (mIsDirectory) {
        return FileSystemDirectoryResponse(mTargetRealPath);
    }
    BlobParent* actor = GetBlobParent(mTargetFile);
    if (!actor) {
        return FileSystemErrorResponse(NS_ERROR_DOM_FILESYSTEM_UNKNOWN_ERR);
    }
    FileSystemFileResponse response;
    response.blobParent() = actor;
    return response;
}
コード例 #3
0
FileSystemResponseValue
GetDirectoryListingTask::GetSuccessRequestResult() const
{
  MOZ_ASSERT(NS_IsMainThread(), "Only call on main thread!");

  InfallibleTArray<PBlobParent*> blobs;

  for (unsigned i = 0; i < mTargetBlobImpls.Length(); i++) {
    BlobParent* blobParent = GetBlobParent(mTargetBlobImpls[i]);
    if (blobParent) {
      blobs.AppendElement(blobParent);
    }
  }
  FileSystemDirectoryListingResponse response;
  response.blobsParent().SwapElements(blobs);
  return response;
}