• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
4 
5 #include "chrome/utility/image_writer/image_writer.h"
6 
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 {
11 
IsValidDevice()12 bool ImageWriter::IsValidDevice() {
13   NOTIMPLEMENTED();
14   return false;
15 }
16 
UnmountVolumes(const base::Closure & continuation)17 void ImageWriter::UnmountVolumes(const base::Closure& continuation) {
18   NOTIMPLEMENTED();
19   return;
20 }
21 
OpenDevice()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();
28 }
29 
30 }  // namespace image_writer
31