Switch global error menu icon to vectorized MD asset
[chromium-blink-merge.git] / storage / common / fileapi / file_system_mount_option.h
blob55ad7d1e5b1e4e9c1b581a34cd265560803f2378
1 // Copyright 2013 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 #ifndef STORAGE_COMMON_FILEAPI_FILE_SYSTEM_MOUNT_OPTION_H_
6 #define STORAGE_COMMON_FILEAPI_FILE_SYSTEM_MOUNT_OPTION_H_
8 namespace storage {
10 // Option for specifying if flush or disk sync operation is wanted after
11 // writing.
12 enum class FlushPolicy {
13 // No flushing is required after a writing operation is completed.
14 FLUSH_ON_COMPLETION,
16 // Flushing is required in order to commit written data. Note, that syncing
17 // is only invoked via FileStreamWriter::Flush() and via base::File::Flush()
18 // for native files. Hence, syncing will not be performed for copying within
19 // non-native file systems as well as for non-native copies performed with
20 // snapshots.
21 NO_FLUSH_ON_COMPLETION
24 // Conveys options for a mounted file systems.
25 class FileSystemMountOption {
26 public:
27 // Constructs with the default options.
28 FileSystemMountOption()
29 : flush_policy_(FlushPolicy::NO_FLUSH_ON_COMPLETION) {}
31 // Constructs with the specified component.
32 explicit FileSystemMountOption(FlushPolicy flush_policy)
33 : flush_policy_(flush_policy) {}
35 FlushPolicy flush_policy() const { return flush_policy_; }
37 private:
38 FlushPolicy flush_policy_;
41 } // namespace storage
43 #endif // STORAGE_COMMON_FILEAPI_FILE_SYSTEM_MOUNT_OPTION_H_