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