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

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_operation_registry.cc

Issue 10214013: Created uber tray UI for monitoring ongoing WebDrive sync operations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/gdata/gdata_operation_registry.h" 5 #include "chrome/browser/chromeos/gdata/gdata_operation_registry.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 10
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 OnProgressUpdate(GetProgressStatusList())); 265 OnProgressUpdate(GetProgressStatusList()));
266 } 266 }
267 } 267 }
268 268
269 bool GDataOperationRegistry::IsFileTransferOperation( 269 bool GDataOperationRegistry::IsFileTransferOperation(
270 const Operation* operation) const { 270 const Operation* operation) const {
271 OperationType type = operation->progress_status().operation_type; 271 OperationType type = operation->progress_status().operation_type;
272 return type == OPERATION_UPLOAD || type == OPERATION_DOWNLOAD; 272 return type == OPERATION_UPLOAD || type == OPERATION_DOWNLOAD;
273 } 273 }
274 274
275 std::vector<GDataOperationRegistry::ProgressStatus> 275 GDataOperationRegistry::ProgressStatusList
276 GDataOperationRegistry::GetProgressStatusList() { 276 GDataOperationRegistry::GetProgressStatusList() {
277 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 277 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
278 278
279 std::vector<ProgressStatus> status_list; 279 ProgressStatusList status_list;
280 for (OperationIDMap::const_iterator iter(&in_flight_operations_); 280 for (OperationIDMap::const_iterator iter(&in_flight_operations_);
281 !iter.IsAtEnd(); 281 !iter.IsAtEnd();
282 iter.Advance()) { 282 iter.Advance()) {
283 const Operation* operation = iter.GetCurrentValue(); 283 const Operation* operation = iter.GetCurrentValue();
284 if (IsFileTransferOperation(operation)) 284 if (IsFileTransferOperation(operation))
285 status_list.push_back(operation->progress_status()); 285 status_list.push_back(operation->progress_status());
286 } 286 }
287 return status_list; 287 return status_list;
288 } 288 }
289 289
290 } // namespace gdata 290 } // namespace gdata
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_operation_registry.h ('k') | chrome/browser/chromeos/gdata/gdata_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698