diff options
author | tzik@chromium.org <tzik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-28 21:19:03 +0000 |
---|---|---|
committer | tzik@chromium.org <tzik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-28 21:19:03 +0000 |
commit | 540d6af4f7ac9e5dbad65fc8fec8673f7144c018 (patch) | |
tree | 0e9599c36a8f05ccca9bd7b01fcb59b036a536c4 /ppapi/shared_impl/file_growth.cc | |
parent | 8ca54e192eaadc07db4434e8ed960691dcab7395 (diff) | |
download | chromium_src-540d6af4f7ac9e5dbad65fc8fec8673f7144c018.zip chromium_src-540d6af4f7ac9e5dbad65fc8fec8673f7144c018.tar.gz chromium_src-540d6af4f7ac9e5dbad65fc8fec8673f7144c018.tar.bz2 |
[Pepper] Wire up append mode writing support of FileIO
BUG=334171
Review URL: https://codereview.chromium.org/130053003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247504 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/shared_impl/file_growth.cc')
-rw-r--r-- | ppapi/shared_impl/file_growth.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ppapi/shared_impl/file_growth.cc b/ppapi/shared_impl/file_growth.cc index 002bd0f..ac97506 100644 --- a/ppapi/shared_impl/file_growth.cc +++ b/ppapi/shared_impl/file_growth.cc @@ -21,4 +21,22 @@ FileGrowth::FileGrowth(int64_t max_written_offset, DCHECK_LE(0, append_mode_write_amount); } +FileGrowthMap FileSizeMapToFileGrowthMapForTesting( + const FileSizeMap& file_sizes) { + FileGrowthMap file_growths; + for (FileSizeMap::const_iterator it = file_sizes.begin(); + it != file_sizes.end(); ++it) + file_growths[it->first] = FileGrowth(it->second, 0); + return file_growths; +} + +FileSizeMap FileGrowthMapToFileSizeMapForTesting( + const FileGrowthMap& file_growths) { + FileSizeMap file_sizes; + for (FileGrowthMap::const_iterator it = file_growths.begin(); + it != file_growths.end(); ++it) + file_sizes[it->first] = it->second.max_written_offset; + return file_sizes; +} + } // namespace ppapi |