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
3 // found in the LICENSE file.
5 #include "chrome/utility/image_writer/image_writer.h"
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
9 // methods and updating the compliation rules appropriately.
10 namespace image_writer
{
12 bool ImageWriter::IsValidDevice() {
17 void ImageWriter::UnmountVolumes(const base::Closure
& continuation
) {
22 bool ImageWriter::OpenDevice() {
23 device_file_
.Initialize(
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();
30 } // namespace image_writer