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

Side by Side 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, 3 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 unified diff | Download patch
OLDNEW
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 #include "chrome/browser/chromeos/drive/job_list.h" 5 #include "chrome/browser/chromeos/drive/job_list.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 10
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 " bytes: %s/%s", 93 " bytes: %s/%s",
94 base::Int64ToString(num_completed_bytes).c_str(), 94 base::Int64ToString(num_completed_bytes).c_str(),
95 base::Int64ToString(num_total_bytes).c_str()); 95 base::Int64ToString(num_total_bytes).c_str());
96 } 96 }
97 return output; 97 return output;
98 } 98 }
99 99
100 bool IsActiveFileTransferJobInfo(const JobInfo& job_info) { 100 bool IsActiveFileTransferJobInfo(const JobInfo& job_info) {
101 // Using switch statement so that compiler can warn when new states or types 101 // Using switch statement so that compiler can warn when new states or types
102 // are added. 102 // are added.
103 switch (job_info.state) {
104 case STATE_NONE:
105 return false;
106 case STATE_RUNNING:
107 case STATE_RETRY:
108 break;
109 }
110
111 switch (job_info.job_type) { 103 switch (job_info.job_type) {
112 case TYPE_GET_ABOUT_RESOURCE: 104 case TYPE_GET_ABOUT_RESOURCE:
113 case TYPE_GET_APP_LIST: 105 case TYPE_GET_APP_LIST:
114 case TYPE_GET_ALL_RESOURCE_LIST: 106 case TYPE_GET_ALL_RESOURCE_LIST:
115 case TYPE_GET_RESOURCE_LIST_IN_DIRECTORY: 107 case TYPE_GET_RESOURCE_LIST_IN_DIRECTORY:
116 case TYPE_SEARCH: 108 case TYPE_SEARCH:
117 case TYPE_GET_CHANGE_LIST: 109 case TYPE_GET_CHANGE_LIST:
118 case TYPE_GET_REMAINING_CHANGE_LIST: 110 case TYPE_GET_REMAINING_CHANGE_LIST:
119 case TYPE_GET_REMAINING_FILE_LIST: 111 case TYPE_GET_REMAINING_FILE_LIST:
120 case TYPE_GET_RESOURCE_ENTRY: 112 case TYPE_GET_RESOURCE_ENTRY:
(...skipping 10 matching lines...) Expand all
131 case TYPE_DOWNLOAD_FILE: 123 case TYPE_DOWNLOAD_FILE:
132 case TYPE_UPLOAD_NEW_FILE: 124 case TYPE_UPLOAD_NEW_FILE:
133 case TYPE_UPLOAD_EXISTING_FILE: 125 case TYPE_UPLOAD_EXISTING_FILE:
134 break; 126 break;
135 } 127 }
136 128
137 return true; 129 return true;
138 } 130 }
139 131
140 } // namespace drive 132 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698