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

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_uploader.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_uploader.h" 5 #include "chrome/browser/chromeos/gdata/gdata_uploader.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 DeleteUpload(upload_file_info); 361 DeleteUpload(upload_file_info);
362 } 362 }
363 363
364 void GDataUploader::UploadFailed(UploadFileInfo* upload_file_info) { 364 void GDataUploader::UploadFailed(UploadFileInfo* upload_file_info) {
365 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 365 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
366 LOG(ERROR) << "Upload failed " << upload_file_info->DebugString(); 366 LOG(ERROR) << "Upload failed " << upload_file_info->DebugString();
367 if (!upload_file_info->completion_callback.is_null()) { 367 if (!upload_file_info->completion_callback.is_null()) {
368 upload_file_info->completion_callback.Run(base::PLATFORM_FILE_ERROR_ABORT, 368 upload_file_info->completion_callback.Run(base::PLATFORM_FILE_ERROR_ABORT,
369 upload_file_info); 369 upload_file_info);
370 } 370 }
371 file_system_->GetOperationRegistry()->CancelForFilePath(
372 upload_file_info->gdata_path);
373 DeleteUpload(upload_file_info); 371 DeleteUpload(upload_file_info);
374 } 372 }
375 373
376 void GDataUploader::DeleteUpload(UploadFileInfo* upload_file_info) { 374 void GDataUploader::DeleteUpload(UploadFileInfo* upload_file_info) {
377 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 375 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
378 376
379 DVLOG(1) << "Deleting upload " << upload_file_info->gdata_path.value(); 377 DVLOG(1) << "Deleting upload " << upload_file_info->gdata_path.value();
380 pending_uploads_.erase(upload_file_info->upload_id); 378 pending_uploads_.erase(upload_file_info->upload_id);
381 379
382 // The file stream is closed by the destructor asynchronously. 380 // The file stream is closed by the destructor asynchronously.
383 delete upload_file_info->file_stream; 381 delete upload_file_info->file_stream;
384 delete upload_file_info; 382 delete upload_file_info;
385 } 383 }
386 384
387 } // namespace gdata 385 } // namespace gdata
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698