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; | |
260 | 259 |
261 switch (volume_info.mount_condition) { | 260 switch (volume_info.mount_condition) { |
262 case chromeos::disks::MOUNT_CONDITION_NONE: | 261 case chromeos::disks::MOUNT_CONDITION_NONE: |
263 volume_metadata->mount_condition = | 262 volume_metadata->mount_condition = |
264 file_manager_private::MOUNT_CONDITION_NONE; | 263 file_manager_private::MOUNT_CONDITION_NONE; |
265 break; | 264 break; |
266 case chromeos::disks::MOUNT_CONDITION_UNKNOWN_FILESYSTEM: | 265 case chromeos::disks::MOUNT_CONDITION_UNKNOWN_FILESYSTEM: |
267 volume_metadata->mount_condition = | 266 volume_metadata->mount_condition = |
268 file_manager_private::MOUNT_CONDITION_UNKNOWN; | 267 file_manager_private::MOUNT_CONDITION_UNKNOWN; |
269 break; | 268 break; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 } | 330 } |
332 | 331 |
333 drive::EventLogger* GetLogger(Profile* profile) { | 332 drive::EventLogger* GetLogger(Profile* profile) { |
334 drive::DriveIntegrationService* service = | 333 drive::DriveIntegrationService* service = |
335 drive::DriveIntegrationServiceFactory::FindForProfile(profile); | 334 drive::DriveIntegrationServiceFactory::FindForProfile(profile); |
336 return service ? service->event_logger() : NULL; | 335 return service ? service->event_logger() : NULL; |
337 } | 336 } |
338 | 337 |
339 } // namespace util | 338 } // namespace util |
340 } // namespace file_manager | 339 } // namespace file_manager |
OLD | NEW |