OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/extensions/extension_file_browser_private_api.h" | 5 #include "chrome/browser/extensions/extension_file_browser_private_api.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 1444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1455 if (!args_->GetString(0, &volume_device_path)) { | 1455 if (!args_->GetString(0, &volume_device_path)) { |
1456 NOTREACHED(); | 1456 NOTREACHED(); |
1457 } | 1457 } |
1458 | 1458 |
1459 #ifdef OS_CHROMEOS | 1459 #ifdef OS_CHROMEOS |
1460 chromeos::MountLibrary* mount_lib = | 1460 chromeos::MountLibrary* mount_lib = |
1461 chromeos::CrosLibrary::Get()->GetMountLibrary(); | 1461 chromeos::CrosLibrary::Get()->GetMountLibrary(); |
1462 chromeos::MountLibrary::DiskMap::const_iterator volume_it = | 1462 chromeos::MountLibrary::DiskMap::const_iterator volume_it = |
1463 mount_lib->disks().find(volume_device_path); | 1463 mount_lib->disks().find(volume_device_path); |
1464 | 1464 |
1465 if (volume_it != mount_lib->disks().end()) { | 1465 if (volume_it != mount_lib->disks().end() && |
| 1466 !volume_it->second->is_hidden()) { |
1466 chromeos::MountLibrary::Disk* volume = volume_it->second; | 1467 chromeos::MountLibrary::Disk* volume = volume_it->second; |
1467 DictionaryValue* volume_info = new DictionaryValue(); | 1468 DictionaryValue* volume_info = new DictionaryValue(); |
1468 result_.reset(volume_info); | 1469 result_.reset(volume_info); |
1469 // Localising mount path. | 1470 // Localising mount path. |
1470 std::string mount_path; | 1471 std::string mount_path; |
1471 if (!volume->mount_path().empty()) { | 1472 if (!volume->mount_path().empty()) { |
1472 FilePath relative_mount_path; | 1473 FilePath relative_mount_path; |
1473 FileManagerUtil::ConvertFileToRelativeFileSystemPath(profile_, | 1474 FileManagerUtil::ConvertFileToRelativeFileSystemPath(profile_, |
1474 FilePath(volume->mount_path()), &relative_mount_path); | 1475 FilePath(volume->mount_path()), &relative_mount_path); |
1475 mount_path = relative_mount_path.value(); | 1476 mount_path = relative_mount_path.value(); |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1655 l10n_util::GetStringUTF16(IDS_CERT_MANAGER_VIEW_CERT_BUTTON)); | 1656 l10n_util::GetStringUTF16(IDS_CERT_MANAGER_VIEW_CERT_BUTTON)); |
1656 dict->SetString("PLAY_MEDIA", | 1657 dict->SetString("PLAY_MEDIA", |
1657 l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_PLAY)); | 1658 l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_PLAY)); |
1658 #if defined(OS_CHROMEOS) | 1659 #if defined(OS_CHROMEOS) |
1659 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableArchives)) | 1660 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableArchives)) |
1660 dict->SetString("ENABLE_ARCHIVES", "true"); | 1661 dict->SetString("ENABLE_ARCHIVES", "true"); |
1661 #endif | 1662 #endif |
1662 | 1663 |
1663 return true; | 1664 return true; |
1664 } | 1665 } |
OLD | NEW |