Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Unified Diff: chrome/utility/image_writer/image_writer.cc

Issue 599853002: [Mac] Use raw disks (/dev/rdisk#) in image_writer_mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a DCHECK in WriteChunk. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/utility/image_writer/image_writer_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/utility/image_writer/image_writer.cc
diff --git a/chrome/utility/image_writer/image_writer.cc b/chrome/utility/image_writer/image_writer.cc
index 65994dbcb6a89fe8b9178443e1fcbe7f21b4feda..2a2b8a1c5d62cb348351429ecfb38ec802df4ea6 100644
--- a/chrome/utility/image_writer/image_writer.cc
+++ b/chrome/utility/image_writer/image_writer.cc
@@ -125,6 +125,7 @@ void ImageWriter::WriteChunk() {
// aligned writes to devices.
int bytes_to_write = bytes_read + (kMemoryAlignment - 1) -
(bytes_read - 1) % kMemoryAlignment;
+ DCHECK_EQ(0, bytes_to_write % kMemoryAlignment);
int bytes_written =
device_file_.Write(bytes_processed_, buffer.get(), bytes_to_write);
« no previous file with comments | « no previous file | chrome/utility/image_writer/image_writer_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698