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

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

Issue 294163008: Adds USB writing for OS X. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@list-devices
Patch Set: Minor updates. Created 6 years, 6 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
Index: chrome/utility/image_writer/image_writer_stub.cc
diff --git a/chrome/utility/image_writer/image_writer_stub.cc b/chrome/utility/image_writer/image_writer_stub.cc
index 264de9d54c2b9ec758605d09a5c313475e9aee5f..738bd97039c00834c796fe9c5c9b580edaf3406a 100644
--- a/chrome/utility/image_writer/image_writer_stub.cc
+++ b/chrome/utility/image_writer/image_writer_stub.cc
@@ -14,9 +14,16 @@ bool ImageWriter::IsValidDevice() {
return false;
}
-bool ImageWriter::UnmountVolumes() {
+void ImageWriter::UnmountVolumes(const base::Closure& continuation) {
NOTIMPLEMENTED();
- return false;
+}
+
+bool ImageWriter::OpenDevice() {
+ device_file_.Initialize(
+ device_path_,
+ base::File::FLAG_OPEN | base::File::FLAG_READ | base::File::FLAG_WRITE |
+ base::File::FLAG_EXCLUSIVE_READ | base::File::FLAG_EXCLUSIVE_WRITE);
+ return device_file_.IsValid();
}
} // namespace image_writer

Powered by Google App Engine
This is Rietveld 408576698