| OLD | NEW |
| 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 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_info
.h" | 5 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_info
.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 namespace chromeos { | 9 namespace chromeos { |
| 10 namespace file_system_provider { | 10 namespace file_system_provider { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 } | 25 } |
| 26 | 26 |
| 27 ProvidedFileSystemInfo::ProvidedFileSystemInfo() | 27 ProvidedFileSystemInfo::ProvidedFileSystemInfo() |
| 28 : writable_(false), | 28 : writable_(false), |
| 29 supports_notify_tag_(false), | 29 supports_notify_tag_(false), |
| 30 configurable_(false), | 30 configurable_(false), |
| 31 source_(extensions::SOURCE_FILE) { | 31 source_(extensions::SOURCE_FILE) { |
| 32 } | 32 } |
| 33 | 33 |
| 34 ProvidedFileSystemInfo::ProvidedFileSystemInfo( | 34 ProvidedFileSystemInfo::ProvidedFileSystemInfo( |
| 35 const std::string& extension_id, | 35 const std::string& source_id, |
| 36 const MountOptions& mount_options, | 36 const MountOptions& mount_options, |
| 37 const base::FilePath& mount_path, | 37 const base::FilePath& mount_path, |
| 38 bool configurable, | 38 bool configurable, |
| 39 extensions::FileSystemProviderSource source) | 39 extensions::FileSystemProviderSource source, |
| 40 : extension_id_(extension_id), | 40 Source_Type type ) |
| 41 : source_id_(source_id), |
| 41 file_system_id_(mount_options.file_system_id), | 42 file_system_id_(mount_options.file_system_id), |
| 42 display_name_(mount_options.display_name), | 43 display_name_(mount_options.display_name), |
| 43 writable_(mount_options.writable), | 44 writable_(mount_options.writable), |
| 44 supports_notify_tag_(mount_options.supports_notify_tag), | 45 supports_notify_tag_(mount_options.supports_notify_tag), |
| 45 opened_files_limit_(mount_options.opened_files_limit), | 46 opened_files_limit_(mount_options.opened_files_limit), |
| 46 mount_path_(mount_path), | 47 mount_path_(mount_path), |
| 47 configurable_(configurable), | 48 configurable_(configurable), |
| 48 source_(source) { | 49 source_(source), |
| 50 source_type_(type) { |
| 49 DCHECK_LE(0, mount_options.opened_files_limit); | 51 DCHECK_LE(0, mount_options.opened_files_limit); |
| 50 } | 52 } |
| 51 | 53 |
| 52 ProvidedFileSystemInfo::~ProvidedFileSystemInfo() {} | 54 ProvidedFileSystemInfo::~ProvidedFileSystemInfo() {} |
| 53 | 55 |
| 56 const std::string ProvidedFileSystemInfo::get_source_id( |
| 57 Source_Type type) const { |
| 58 if (type != source_type_) |
| 59 return std::string(); |
| 60 |
| 61 return source_id_; |
| 62 } |
| 63 |
| 54 } // namespace file_system_provider | 64 } // namespace file_system_provider |
| 55 } // namespace chromeos | 65 } // namespace chromeos |
| OLD | NEW |