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_
10 // Option for specifying if flush or disk sync operation is wanted after
12 enum class FlushPolicy
{
13 // No flushing is required after a writing operation is completed.
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
21 NO_FLUSH_ON_COMPLETION
24 // Conveys options for a mounted file systems.
25 class FileSystemMountOption
{
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_
; }
38 FlushPolicy flush_policy_
;
41 } // namespace storage
43 #endif // STORAGE_COMMON_FILEAPI_FILE_SYSTEM_MOUNT_OPTION_H_