Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(236)

Unified Diff: chrome/browser/chromeos/extensions/file_manager/event_router.cc

Issue 542573002: Make onFileTransferUpdated single value from list. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/common/extensions/api/file_browser_private.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/extensions/file_manager/event_router.cc
diff --git a/chrome/browser/chromeos/extensions/file_manager/event_router.cc b/chrome/browser/chromeos/extensions/file_manager/event_router.cc
index 547f8add6dd17d1d7c486cdf84c49768106dab7d..9d8613c329d3b245c347e4bfd86b5169beb19531 100644
--- a/chrome/browser/chromeos/extensions/file_manager/event_router.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/event_router.cc
@@ -671,25 +671,18 @@ void EventRouter::SendDriveFileTransferEvent() {
if (!drive_job_info_for_scheduled_event_)
return;
- // Convert the drive_job_info_for_scheduled_event_ to IDL type.
- std::vector<linked_ptr<file_browser_private::FileTransferStatus> >
- status_list;
-
- linked_ptr<file_browser_private::FileTransferStatus> status(
- new file_browser_private::FileTransferStatus());
+ file_browser_private::FileTransferStatus status;
JobInfoToTransferStatus(profile_,
kFileManagerAppId,
drive_job_info_for_scheduled_event_->status,
drive_job_info_for_scheduled_event_->job_info,
- status.get());
- status_list.push_back(status);
+ &status);
drive_job_info_for_scheduled_event_.reset();
- BroadcastEvent(
- profile_,
- file_browser_private::OnFileTransfersUpdated::kEventName,
- file_browser_private::OnFileTransfersUpdated::Create(status_list));
+ BroadcastEvent(profile_,
+ file_browser_private::OnFileTransfersUpdated::kEventName,
+ file_browser_private::OnFileTransfersUpdated::Create(status));
}
void EventRouter::OnDirectoryChanged(const base::FilePath& drive_path) {
« no previous file with comments | « no previous file | chrome/common/extensions/api/file_browser_private.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698