Move StartsWith[ASCII] to base namespace.
[chromium-blink-merge.git] / chrome / browser / chromeos / file_system_provider / provided_file_system_info.h
blobf2b51e6e8d4a698a5448aeeb673b3b7d2307040b
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 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INFO_H_
6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INFO_H_
8 #include <string>
10 #include "base/files/file_path.h"
11 #include "chrome/common/extensions/api/file_system_provider_capabilities/file_system_provider_capabilities_handler.h"
13 namespace chromeos {
14 namespace file_system_provider {
16 // Options for creating the provided file system info.
17 struct MountOptions {
18 MountOptions();
20 // Only mandatory fields.
21 MountOptions(const std::string& file_system_id,
22 const std::string& display_name);
24 std::string file_system_id;
25 std::string display_name;
26 bool writable;
27 bool supports_notify_tag;
28 int opened_files_limit;
31 // Contains information about the provided file system instance.
32 class ProvidedFileSystemInfo {
33 public:
34 ProvidedFileSystemInfo();
36 ProvidedFileSystemInfo(const std::string& extension_id,
37 const MountOptions& mount_options,
38 const base::FilePath& mount_path,
39 bool configurable,
40 extensions::FileSystemProviderSource source);
42 ~ProvidedFileSystemInfo();
44 const std::string& extension_id() const { return extension_id_; }
45 const std::string& file_system_id() const { return file_system_id_; }
46 const std::string& display_name() const { return display_name_; }
47 bool writable() const { return writable_; }
48 bool supports_notify_tag() const { return supports_notify_tag_; }
49 int opened_files_limit() const { return opened_files_limit_; }
50 const base::FilePath& mount_path() const { return mount_path_; }
51 const bool configurable() const { return configurable_; }
52 extensions::FileSystemProviderSource source() const { return source_; }
54 private:
55 // ID of the extension providing this file system.
56 std::string extension_id_;
58 // ID of the file system.
59 std::string file_system_id_;
61 // Name of the file system, can be rendered in the UI.
62 std::string display_name_;
64 // Whether the file system is writable or just read-only.
65 bool writable_;
67 // Supports tags for file/directory change notifications.
68 bool supports_notify_tag_;
70 // Limit of opened files in parallel. If unlimited, then 0.
71 int opened_files_limit_;
73 // Mount path of the underlying file system.
74 base::FilePath mount_path_;
76 // Whether the file system is configurable.
77 bool configurable_;
79 // Source of the file system's data.
80 extensions::FileSystemProviderSource source_;
83 } // namespace file_system_provider
84 } // namespace chromeos
86 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INFO_H_