Index: chrome/browser/chromeos/extensions/file_manager/event_router.h |
diff --git a/chrome/browser/chromeos/extensions/file_manager/event_router.h b/chrome/browser/chromeos/extensions/file_manager/event_router.h |
index 7e094d6a1926f7a9a24149e389bd7ba7a530c60b..f66f8c8c329388234077b14cdfb72064d7478ba6 100644 |
--- a/chrome/browser/chromeos/extensions/file_manager/event_router.h |
+++ b/chrome/browser/chromeos/extensions/file_manager/event_router.h |
@@ -181,11 +181,6 @@ class EventRouter |
void ShowRemovableDeviceInFileManager(VolumeType type, |
const base::FilePath& mount_path); |
- // Sends onFileTranferUpdated to extensions if needed. If |always| is true, |
- // it sends the event always. Otherwise, it sends the event if enough time has |
- // passed from the previous event so as not to make extension busy. |
- void SendDriveFileTransferEvent(bool always); |
- |
// Manages the list of currently active Drive file transfer jobs. |
struct DriveJobInfoWithStatus { |
DriveJobInfoWithStatus(); |
@@ -194,9 +189,19 @@ class EventRouter |
drive::JobInfo job_info; |
std::string status; |
}; |
+ |
+ // Schedule onFileTransferUpdated event. |
kinaba
2014/09/03 05:42:24
Please add some comment on why scheduling is neces
iseki
2014/09/03 12:29:00
Done.
|
+ void ScheduleDriveFileTransferEvent(const drive::JobInfo& job_info, |
+ const std::string& status, |
+ bool immediate); |
+ |
+ // Sends onFileTranferUpdated to extensions if after nextSendTime_. |
kinaba
2014/09/03 05:42:24
"if after nextSendTime_" is not grammatical. Proba
iseki
2014/09/03 12:29:00
Done.
|
+ void SendDriveFileTransferEvent(); |
+ |
std::map<drive::JobID, DriveJobInfoWithStatus> drive_jobs_; |
- base::Time last_file_transfer_event_; |
+ scoped_ptr<DriveJobInfoWithStatus> drive_job_info_for_scheduled_event_; |
base::Time last_copy_progress_event_; |
+ base::Time next_send_file_transfer_event_; |
WatcherMap file_watchers_; |
scoped_ptr<PrefChangeRegistrar> pref_change_registrar_; |