| Index: chrome/browser/media_galleries/linux/mtp_read_file_worker.cc
|
| diff --git a/chrome/browser/media_galleries/linux/mtp_read_file_worker.cc b/chrome/browser/media_galleries/linux/mtp_read_file_worker.cc
|
| index 7edf995a3b5f631f1af90f4cc042e384ee80a8cf..5d11427559f15bb2b64cad5252aea298e776d29a 100644
|
| --- a/chrome/browser/media_galleries/linux/mtp_read_file_worker.cc
|
| +++ b/chrome/browser/media_galleries/linux/mtp_read_file_worker.cc
|
| @@ -27,11 +27,9 @@ uint32 WriteDataChunkIntoSnapshotFileOnFileThread(
|
| const base::FilePath& snapshot_file_path,
|
| const std::string& data) {
|
| DCHECK_CURRENTLY_ON(content::BrowserThread::FILE);
|
| - int bytes_written =
|
| - base::AppendToFile(snapshot_file_path, data.data(),
|
| - base::checked_cast<int>(data.size()));
|
| - return (static_cast<int>(data.size()) == bytes_written) ?
|
| - base::checked_cast<uint32>(bytes_written) : 0;
|
| + return base::AppendToFile(snapshot_file_path, data.c_str(), data.size())
|
| + ? base::checked_cast<uint32>(data.size())
|
| + : 0;
|
| }
|
|
|
| } // namespace
|
|
|