OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_JOB_LIST_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_JOB_LIST_H_ |
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_JOB_LIST_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_JOB_LIST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 int64 num_total_bytes; | 82 int64 num_total_bytes; |
83 | 83 |
84 // Drive path of the file that this job acts on. | 84 // Drive path of the file that this job acts on. |
85 base::FilePath file_path; | 85 base::FilePath file_path; |
86 | 86 |
87 // Time when the job is started (i.e. the request is sent to the server). | 87 // Time when the job is started (i.e. the request is sent to the server). |
88 base::Time start_time; | 88 base::Time start_time; |
89 | 89 |
90 // Returns the string representation of the job info. | 90 // Returns the string representation of the job info. |
91 std::string ToString() const; | 91 std::string ToString() const; |
| 92 |
| 93 // Total number of jobs. |
| 94 long num_total_jobs; |
92 }; | 95 }; |
93 | 96 |
94 // Checks if |job_info| represents a job for currently active file transfer. | 97 // Checks if |job_info| represents a job for currently active file transfer. |
95 bool IsActiveFileTransferJobInfo(const JobInfo& job_info); | 98 bool IsActiveFileTransferJobInfo(const JobInfo& job_info); |
96 | 99 |
97 // The interface for observing JobListInterface. | 100 // The interface for observing JobListInterface. |
98 // All events are notified in the UI thread. | 101 // All events are notified in the UI thread. |
99 class JobListObserver { | 102 class JobListObserver { |
100 public: | 103 public: |
101 // Called when a new job id added. | 104 // Called when a new job id added. |
(...skipping 29 matching lines...) Expand all Loading... |
131 // Cancels the job. | 134 // Cancels the job. |
132 virtual void CancelJob(JobID job_id) = 0; | 135 virtual void CancelJob(JobID job_id) = 0; |
133 | 136 |
134 // Cancels all the jobs. | 137 // Cancels all the jobs. |
135 virtual void CancelAllJobs() = 0; | 138 virtual void CancelAllJobs() = 0; |
136 }; | 139 }; |
137 | 140 |
138 } // namespace drive | 141 } // namespace drive |
139 | 142 |
140 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_JOB_LIST_H_ | 143 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_JOB_LIST_H_ |
OLD | NEW |