X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fppapi%2Fproxy%2Ffile_system_resource.cc;h=0be0ea52e5e30504ec32ad121dcca9bdb82e6656;hb=ff3e2503a20db9193d323c1d19c38c68004dec4a;hp=5d6161e8cf2c5afae4225e9b62b2c37a6492f961;hpb=7338fba38ba696536d1cc9d389afd716a6ab2fe6;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/ppapi/proxy/file_system_resource.cc b/src/ppapi/proxy/file_system_resource.cc index 5d6161e..0be0ea5 100644 --- a/src/ppapi/proxy/file_system_resource.cc +++ b/src/ppapi/proxy/file_system_resource.cc @@ -175,8 +175,7 @@ void FileSystemResource::ReserveQuota(int64_t amount) { DCHECK(!reserving_quota_); reserving_quota_ = true; - // TODO(tzik): Use FileGrowthMap here after the IPC signature changed. - FileSizeMap file_sizes; + FileGrowthMap file_growths; for (std::set::iterator it = files_.begin(); it != files_.end(); ++it) { EnterResourceNoLock enter(*it, true); @@ -185,12 +184,12 @@ void FileSystemResource::ReserveQuota(int64_t amount) { continue; } PPB_FileIO_API* file_io_api = enter.object(); - file_sizes[*it] = - file_io_api->GetMaxWrittenOffset() + - file_io_api->GetAppendModeWriteAmount(); + file_growths[*it] = FileGrowth( + file_io_api->GetMaxWrittenOffset(), + file_io_api->GetAppendModeWriteAmount()); } Call(BROWSER, - PpapiHostMsg_FileSystem_ReserveQuota(amount, file_sizes), + PpapiHostMsg_FileSystem_ReserveQuota(amount, file_growths), base::Bind(&FileSystemResource::ReserveQuotaComplete, this)); } @@ -198,13 +197,13 @@ void FileSystemResource::ReserveQuota(int64_t amount) { void FileSystemResource::ReserveQuotaComplete( const ResourceMessageReplyParams& params, int64_t amount, - const FileSizeMap& max_written_offsets) { + const FileSizeMap& file_sizes) { DCHECK(reserving_quota_); reserving_quota_ = false; reserved_quota_ = amount; - for (FileSizeMap::const_iterator it = max_written_offsets.begin(); - it != max_written_offsets.end(); ++it) { + for (FileSizeMap::const_iterator it = file_sizes.begin(); + it != file_sizes.end(); ++it) { EnterResourceNoLock enter(it->first, true); // It is possible that the host has sent an offset for a file that has been