| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chromeos/dbus/cros_disks_client.h" | 5 #include "chromeos/dbus/cros_disks_client.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/chromeos/chromeos_version.h" | 10 #include "base/chromeos/chromeos_version.h" |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 base::MessageLoopProxy::current()->PostTask( | 454 base::MessageLoopProxy::current()->PostTask( |
| 455 FROM_HERE, base::Bind(error_callback, device_path)); | 455 FROM_HERE, base::Bind(error_callback, device_path)); |
| 456 return; | 456 return; |
| 457 } | 457 } |
| 458 | 458 |
| 459 mounted_to_source_path_map_.erase(device_path); | 459 mounted_to_source_path_map_.erase(device_path); |
| 460 | 460 |
| 461 // Remove the directory created in Mount(). | 461 // Remove the directory created in Mount(). |
| 462 base::WorkerPool::PostTaskAndReply( | 462 base::WorkerPool::PostTaskAndReply( |
| 463 FROM_HERE, | 463 FROM_HERE, |
| 464 base::Bind(base::IgnoreResult(&file_util::Delete), | 464 base::Bind(base::IgnoreResult(&base::Delete), |
| 465 base::FilePath::FromUTF8Unsafe(device_path), | 465 base::FilePath::FromUTF8Unsafe(device_path), |
| 466 true /* recursive */), | 466 true /* recursive */), |
| 467 base::Bind(callback, device_path), | 467 base::Bind(callback, device_path), |
| 468 true /* task_is_slow */); | 468 true /* task_is_slow */); |
| 469 } | 469 } |
| 470 | 470 |
| 471 virtual void EnumerateAutoMountableDevices( | 471 virtual void EnumerateAutoMountableDevices( |
| 472 const EnumerateAutoMountableDevicesCallback& callback, | 472 const EnumerateAutoMountableDevicesCallback& callback, |
| 473 const ErrorCallback& error_callback) OVERRIDE { | 473 const ErrorCallback& error_callback) OVERRIDE { |
| 474 std::vector<std::string> device_paths; | 474 std::vector<std::string> device_paths; |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 760 } | 760 } |
| 761 | 761 |
| 762 // static | 762 // static |
| 763 base::FilePath CrosDisksClient::GetRemovableDiskMountPoint() { | 763 base::FilePath CrosDisksClient::GetRemovableDiskMountPoint() { |
| 764 return base::FilePath(base::chromeos::IsRunningOnChromeOS() ? | 764 return base::FilePath(base::chromeos::IsRunningOnChromeOS() ? |
| 765 FILE_PATH_LITERAL("/media/removable") : | 765 FILE_PATH_LITERAL("/media/removable") : |
| 766 FILE_PATH_LITERAL("/tmp/chromeos/media/removable")); | 766 FILE_PATH_LITERAL("/tmp/chromeos/media/removable")); |
| 767 } | 767 } |
| 768 | 768 |
| 769 } // namespace chromeos | 769 } // namespace chromeos |
| OLD | NEW |