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

Unified Diff: chrome/browser/chromeos/drive/job_list.cc

Issue 507293002: Enrich fileBrowserPrivate.onFileTransfersUpdated event to support displaying total number of jobs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
Index: chrome/browser/chromeos/drive/job_list.cc
diff --git a/chrome/browser/chromeos/drive/job_list.cc b/chrome/browser/chromeos/drive/job_list.cc
index 24f9afee2b9b56d6ccb427a380c7a71aca91167d..3dba2ced9e0bb42771d9b39c295d8a213ffed8b3 100644
--- a/chrome/browser/chromeos/drive/job_list.cc
+++ b/chrome/browser/chromeos/drive/job_list.cc
@@ -61,6 +61,8 @@ std::string JobTypeToString(JobType type) {
std::string JobStateToString(JobState state) {
switch (state) {
+ case STATE_NEW:
+ return "STATE_NEW";
case STATE_NONE:
return "STATE_NONE";
case STATE_RUNNING:
@@ -77,7 +79,8 @@ JobInfo::JobInfo(JobType in_job_type)
job_id(-1),
state(STATE_NONE),
num_completed_bytes(0),
- num_total_bytes(0) {
+ num_total_bytes(0),
+ num_total_jobs(0) {
}
std::string JobInfo::ToString() const {
@@ -103,6 +106,7 @@ bool IsActiveFileTransferJobInfo(const JobInfo& job_info) {
switch (job_info.state) {
case STATE_NONE:
return false;
+ case STATE_NEW:
case STATE_RUNNING:
case STATE_RETRY:
break;

Powered by Google App Engine
This is Rietveld 408576698