| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/job_event_router.h" | 5 #include "chrome/browser/chromeos/extensions/file_manager/job_event_router.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #include "base/thread_task_runner_handle.h" | 9 #include "base/thread_task_runner_handle.h" |
| 10 #include "chrome/browser/chromeos/drive/file_system_core_util.h" | |
| 11 #include "chrome/browser/chromeos/file_manager/app_id.h" | 10 #include "chrome/browser/chromeos/file_manager/app_id.h" |
| 12 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 12 #include "components/drive/file_system_core_util.h" |
| 13 #include "content/public/browser/browser_thread.h" | 13 #include "content/public/browser/browser_thread.h" |
| 14 | 14 |
| 15 using content::BrowserThread; | 15 using content::BrowserThread; |
| 16 namespace file_manager_private = extensions::api::file_manager_private; | 16 namespace file_manager_private = extensions::api::file_manager_private; |
| 17 | 17 |
| 18 namespace file_manager { | 18 namespace file_manager { |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 // Utility function to check if |job_info| is a file uploading job. | 21 // Utility function to check if |job_info| is a file uploading job. |
| 22 bool IsUploadJob(drive::JobType type) { | 22 bool IsUploadJob(drive::JobType type) { |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 pending_event_->total = num_total_bytes_; | 128 pending_event_->total = num_total_bytes_; |
| 129 | 129 |
| 130 BroadcastEvent( | 130 BroadcastEvent( |
| 131 extensions::events::FILE_MANAGER_PRIVATE_ON_FILE_TRANSFERS_UPDATED, | 131 extensions::events::FILE_MANAGER_PRIVATE_ON_FILE_TRANSFERS_UPDATED, |
| 132 file_manager_private::OnFileTransfersUpdated::kEventName, | 132 file_manager_private::OnFileTransfersUpdated::kEventName, |
| 133 file_manager_private::OnFileTransfersUpdated::Create(*pending_event_)); | 133 file_manager_private::OnFileTransfersUpdated::Create(*pending_event_)); |
| 134 pending_event_.reset(); | 134 pending_event_.reset(); |
| 135 } | 135 } |
| 136 | 136 |
| 137 } // namespace file_manager | 137 } // namespace file_manager |
| OLD | NEW |