Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(419)

Side by Side Diff: chrome/browser/chromeos/file_system_provider/provided_file_system_info.h

Issue 624903002: [fsp] Group arguments for mounting into a struct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a bug. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INFO_H _ 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 _ 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INFO_H _
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 11
12 namespace chromeos { 12 namespace chromeos {
13 namespace file_system_provider { 13 namespace file_system_provider {
14 14
15 // Options for creating the provided file system info.
16 struct MountOptions {
17 MountOptions();
18
19 // Only mandatory fields.
20 MountOptions(const std::string& file_system_id,
21 const std::string& display_name);
22
23 std::string extension_id;
24 std::string file_system_id;
25 std::string display_name;
26 bool writable;
27 bool supports_notify_tag;
28 };
29
15 // Contains information about the provided file system instance. 30 // Contains information about the provided file system instance.
16 class ProvidedFileSystemInfo { 31 class ProvidedFileSystemInfo {
17 public: 32 public:
18 ProvidedFileSystemInfo(); 33 ProvidedFileSystemInfo();
34
19 ProvidedFileSystemInfo(const std::string& extension_id, 35 ProvidedFileSystemInfo(const std::string& extension_id,
20 const std::string& file_system_id, 36 const MountOptions& mount_options,
21 const std::string& display_name,
22 bool writable,
23 bool supports_notify_tag,
24 const base::FilePath& mount_path); 37 const base::FilePath& mount_path);
25 38
26 ~ProvidedFileSystemInfo(); 39 ~ProvidedFileSystemInfo();
27 40
28 const std::string& extension_id() const { return extension_id_; } 41 const std::string& extension_id() const { return extension_id_; }
29 const std::string& file_system_id() const { return file_system_id_; } 42 const std::string& file_system_id() const { return file_system_id_; }
30 const std::string& display_name() const { return display_name_; } 43 const std::string& display_name() const { return display_name_; }
31 bool writable() const { return writable_; } 44 bool writable() const { return writable_; }
32 bool supports_notify_tag() const { return supports_notify_tag_; } 45 bool supports_notify_tag() const { return supports_notify_tag_; }
33 const base::FilePath& mount_path() const { return mount_path_; } 46 const base::FilePath& mount_path() const { return mount_path_; }
(...skipping 15 matching lines...) Expand all
49 bool supports_notify_tag_; 62 bool supports_notify_tag_;
50 63
51 // Mount path of the underlying file system. 64 // Mount path of the underlying file system.
52 base::FilePath mount_path_; 65 base::FilePath mount_path_;
53 }; 66 };
54 67
55 } // namespace file_system_provider 68 } // namespace file_system_provider
56 } // namespace chromeos 69 } // namespace chromeos
57 70
58 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INF O_H_ 71 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INF O_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698