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 42e65b60b5f4865cdf63fe543ebc6ae7bf0b849f..bfcf4c9831b47eeb8c38ed7ba17b6d5fa6172c3d 100644 |
--- a/chrome/browser/chromeos/extensions/file_manager/event_router.h |
+++ b/chrome/browser/chromeos/extensions/file_manager/event_router.h |
@@ -182,11 +182,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(); |
@@ -195,9 +190,23 @@ class EventRouter |
drive::JobInfo job_info; |
std::string status; |
}; |
+ |
+ // Sends onFileTranferUpdated to extensions if needed. The request is send |
+ // after enough time has passed from the previous event if should_delay is |
+ // true. call_time is used to refresh sending event. |
+ void SendDriveFileTransferEvent( |
+ const DriveJobInfoWithStatus& job_info_with_status, |
+ base::Time call_time, |
+ bool should_delay); |
+ |
std::map<drive::JobID, DriveJobInfoWithStatus> drive_jobs_; |
base::Time last_file_transfer_event_; |
base::Time last_copy_progress_event_; |
+ base::Time last_post_delayed_task_; |
+ base::Time first_delay_task_; |
+ |
+ const base::TimeDelta delay_time_; |
+ const base::TimeDelta force_send_time_; |
WatcherMap file_watchers_; |
scoped_ptr<PrefChangeRegistrar> pref_change_registrar_; |