summaryrefslogtreecommitdiffstats
path: root/webkit/common/fileapi/file_system_mount_option.h
blob: 49393a12354752161717a809d81496376ca6c4be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef WEBKIT_COMMON_FILEAPI_FILE_SYSTEM_MOUNT_OPTION_H_
#define WEBKIT_COMMON_FILEAPI_FILE_SYSTEM_MOUNT_OPTION_H_

namespace fileapi {

// Option for specifying if disk sync operation is wanted after copying.
enum CopySyncOption {
  COPY_SYNC_OPTION_NO_SYNC,
  COPY_SYNC_OPTION_SYNC,
};

// Conveys options for a mounted file systems.
class FileSystemMountOption {
 public:
  // Constructs with the default options.
  FileSystemMountOption()
      : copy_sync_option_(COPY_SYNC_OPTION_NO_SYNC) {}

  // Constructs with the specified component.
  explicit FileSystemMountOption(CopySyncOption copy_sync_option)
      : copy_sync_option_(copy_sync_option) {}

  CopySyncOption copy_sync_option() const {
    return copy_sync_option_;
  }

 private:
  CopySyncOption copy_sync_option_;
};

}  // namespace fileapi

#endif  // WEBKIT_COMMON_FILEAPI_FILE_SYSTEM_MOUNT_OPTION_H_