Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / media_galleries / linux / mtp_read_file_worker.cc
index 7edf995..5d11427 100644 (file)
@@ -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