OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/utility/image_writer/image_writer.h" | 5 #include "chrome/utility/image_writer/image_writer.h" |
6 | 6 |
7 // This file contains the default version of the platform-specific methods of | 7 // This file contains the default version of the platform-specific methods of |
8 // the ImageWriter. Add new platforms by creating a new version of these | 8 // the ImageWriter. Add new platforms by creating a new version of these |
9 // methods and updating the compliation rules appropriately. | 9 // methods and updating the compliation rules appropriately. |
10 namespace image_writer { | 10 namespace image_writer { |
11 | 11 |
12 bool ImageWriter::IsValidDevice() { | 12 bool ImageWriter::IsValidDevice() { |
13 NOTIMPLEMENTED(); | 13 NOTIMPLEMENTED(); |
14 return false; | 14 return false; |
15 } | 15 } |
16 | 16 |
17 bool ImageWriter::UnmountVolumes() { | 17 void ImageWriter::UnmountVolumes(const base::Closure& continuation) { |
18 NOTIMPLEMENTED(); | 18 NOTIMPLEMENTED(); |
19 return false; | 19 return; |
| 20 } |
| 21 |
| 22 bool ImageWriter::OpenDevice() { |
| 23 device_file_.Initialize( |
| 24 device_path_, |
| 25 base::File::FLAG_OPEN | base::File::FLAG_READ | base::File::FLAG_WRITE | |
| 26 base::File::FLAG_EXCLUSIVE_READ | base::File::FLAG_EXCLUSIVE_WRITE); |
| 27 return device_file_.IsValid(); |
20 } | 28 } |
21 | 29 |
22 } // namespace image_writer | 30 } // namespace image_writer |
OLD | NEW |