| 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 // MTPOpenStorageWorker implementation. | 5 // MTPOpenStorageWorker implementation. |
| 6 | 6 |
| 7 #include "chrome/browser/media_gallery/linux/mtp_open_storage_worker.h" | 7 #include "chrome/browser/media_gallery/linux/mtp_open_storage_worker.h" |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/sequenced_task_runner.h" | 11 #include "base/sequenced_task_runner.h" |
| 12 #include "base/synchronization/waitable_event.h" | 12 #include "base/synchronization/waitable_event.h" |
| 13 #include "chrome/browser/media_transfer_protocol/media_transfer_protocol_manager
.h" | |
| 14 #include "content/public/browser/browser_thread.h" | 13 #include "content/public/browser/browser_thread.h" |
| 14 #include "device/media_transfer_protocol/media_transfer_protocol_manager.h" |
| 15 #include "third_party/cros_system_api/dbus/service_constants.h" | 15 #include "third_party/cros_system_api/dbus/service_constants.h" |
| 16 | 16 |
| 17 namespace chrome { | 17 namespace chrome { |
| 18 | 18 |
| 19 MTPOpenStorageWorker::MTPOpenStorageWorker( | 19 MTPOpenStorageWorker::MTPOpenStorageWorker( |
| 20 const std::string& name, | 20 const std::string& name, |
| 21 base::SequencedTaskRunner* task_runner, | 21 base::SequencedTaskRunner* task_runner, |
| 22 base::WaitableEvent* task_completed_event, | 22 base::WaitableEvent* task_completed_event, |
| 23 base::WaitableEvent* shutdown_event) | 23 base::WaitableEvent* shutdown_event) |
| 24 : storage_name_(name), | 24 : storage_name_(name), |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); | 67 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
| 68 if (cancel_tasks_flag_.IsSet()) | 68 if (cancel_tasks_flag_.IsSet()) |
| 69 return; | 69 return; |
| 70 | 70 |
| 71 if (!error) | 71 if (!error) |
| 72 device_handle_ = device_handle; | 72 device_handle_ = device_handle; |
| 73 on_task_completed_event_->Signal(); | 73 on_task_completed_event_->Signal(); |
| 74 } | 74 } |
| 75 | 75 |
| 76 } // namespace chrome | 76 } // namespace chrome |
| OLD | NEW |