| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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/extensions/file_manager/private_api_util.h" | 5 #include "chrome/browser/chromeos/extensions/file_manager/private_api_util.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 volume_metadata->device_path.reset( | 249 volume_metadata->device_path.reset( |
| 250 new std::string(volume_info.system_path_prefix.AsUTF8Unsafe())); | 250 new std::string(volume_info.system_path_prefix.AsUTF8Unsafe())); |
| 251 volume_metadata->is_parent_device.reset( | 251 volume_metadata->is_parent_device.reset( |
| 252 new bool(volume_info.is_parent)); | 252 new bool(volume_info.is_parent)); |
| 253 } else { | 253 } else { |
| 254 volume_metadata->device_type = | 254 volume_metadata->device_type = |
| 255 file_manager_private::DEVICE_TYPE_NONE; | 255 file_manager_private::DEVICE_TYPE_NONE; |
| 256 } | 256 } |
| 257 | 257 |
| 258 volume_metadata->is_read_only = volume_info.is_read_only; | 258 volume_metadata->is_read_only = volume_info.is_read_only; |
| 259 volume_metadata->has_media = volume_info.has_media; |
| 259 | 260 |
| 260 switch (volume_info.mount_condition) { | 261 switch (volume_info.mount_condition) { |
| 261 case chromeos::disks::MOUNT_CONDITION_NONE: | 262 case chromeos::disks::MOUNT_CONDITION_NONE: |
| 262 volume_metadata->mount_condition = | 263 volume_metadata->mount_condition = |
| 263 file_manager_private::MOUNT_CONDITION_NONE; | 264 file_manager_private::MOUNT_CONDITION_NONE; |
| 264 break; | 265 break; |
| 265 case chromeos::disks::MOUNT_CONDITION_UNKNOWN_FILESYSTEM: | 266 case chromeos::disks::MOUNT_CONDITION_UNKNOWN_FILESYSTEM: |
| 266 volume_metadata->mount_condition = | 267 volume_metadata->mount_condition = |
| 267 file_manager_private::MOUNT_CONDITION_UNKNOWN; | 268 file_manager_private::MOUNT_CONDITION_UNKNOWN; |
| 268 break; | 269 break; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 } | 331 } |
| 331 | 332 |
| 332 drive::EventLogger* GetLogger(Profile* profile) { | 333 drive::EventLogger* GetLogger(Profile* profile) { |
| 333 drive::DriveIntegrationService* service = | 334 drive::DriveIntegrationService* service = |
| 334 drive::DriveIntegrationServiceFactory::FindForProfile(profile); | 335 drive::DriveIntegrationServiceFactory::FindForProfile(profile); |
| 335 return service ? service->event_logger() : NULL; | 336 return service ? service->event_logger() : NULL; |
| 336 } | 337 } |
| 337 | 338 |
| 338 } // namespace util | 339 } // namespace util |
| 339 } // namespace file_manager | 340 } // namespace file_manager |
| OLD | NEW |