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

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..bbb092aee8e31b9bc861fd06e04ad4e8eae6314a 100644
--- a/chrome/browser/chromeos/drive/job_list.cc
+++ b/chrome/browser/chromeos/drive/job_list.cc
@@ -77,7 +77,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 {
@@ -100,14 +101,6 @@ std::string JobInfo::ToString() const {
bool IsActiveFileTransferJobInfo(const JobInfo& job_info) {
// Using switch statement so that compiler can warn when new states or types
// are added.
- switch (job_info.state) {
- case STATE_NONE:
- return false;
- case STATE_RUNNING:
- case STATE_RETRY:
- break;
- }
-
switch (job_info.job_type) {
case TYPE_GET_ABOUT_RESOURCE:
case TYPE_GET_APP_LIST:

Powered by Google App Engine
This is Rietveld 408576698