OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "chromeos/dbus/fake_cros_disks_client.h" | 5 #include "chromeos/dbus/fake_cros_disks_client.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/single_thread_task_runner.h" | 11 #include "base/single_thread_task_runner.h" |
12 #include "base/task_runner_util.h" | 12 #include "base/task_runner_util.h" |
13 #include "base/thread_task_runner_handle.h" | 13 #include "base/threading/thread_task_runner_handle.h" |
14 #include "base/threading/worker_pool.h" | 14 #include "base/threading/worker_pool.h" |
15 | 15 |
16 namespace chromeos { | 16 namespace chromeos { |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 // Performs fake mounting by creating a directory with a dummy file. | 20 // Performs fake mounting by creating a directory with a dummy file. |
21 MountError PerformFakeMount(const std::string& source_path, | 21 MountError PerformFakeMount(const std::string& source_path, |
22 const base::FilePath& mounted_path) { | 22 const base::FilePath& mounted_path) { |
23 // Just create an empty directory and shows it as the mounted directory. | 23 // Just create an empty directory and shows it as the mounted directory. |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 bool FakeCrosDisksClient::SendFormatCompletedEvent( | 199 bool FakeCrosDisksClient::SendFormatCompletedEvent( |
200 FormatError error_code, | 200 FormatError error_code, |
201 const std::string& device_path) { | 201 const std::string& device_path) { |
202 if (format_completed_handler_.is_null()) | 202 if (format_completed_handler_.is_null()) |
203 return false; | 203 return false; |
204 format_completed_handler_.Run(error_code, device_path); | 204 format_completed_handler_.Run(error_code, device_path); |
205 return true; | 205 return true; |
206 } | 206 } |
207 | 207 |
208 } // namespace chromeos | 208 } // namespace chromeos |
OLD | NEW |