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

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

Issue 10196007: gdata: Get rid of GetProgressStatusList() and friends (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 8 years, 8 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_->CancelOperation(upload_file_info->gdata_path); 371 file_system_->GetOperationRegistry()->CancelForFilePath(
372 upload_file_info->gdata_path);
372 DeleteUpload(upload_file_info); 373 DeleteUpload(upload_file_info);
373 } 374 }
374 375
375 void GDataUploader::DeleteUpload(UploadFileInfo* upload_file_info) { 376 void GDataUploader::DeleteUpload(UploadFileInfo* upload_file_info) {
376 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 377 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
377 378
378 DVLOG(1) << "Deleting upload " << upload_file_info->gdata_path.value(); 379 DVLOG(1) << "Deleting upload " << upload_file_info->gdata_path.value();
379 pending_uploads_.erase(upload_file_info->upload_id); 380 pending_uploads_.erase(upload_file_info->upload_id);
380 381
381 // The file stream is closed by the destructor asynchronously. 382 // The file stream is closed by the destructor asynchronously.
382 delete upload_file_info->file_stream; 383 delete upload_file_info->file_stream;
383 delete upload_file_info; 384 delete upload_file_info;
384 } 385 }
385 386
386 } // namespace gdata 387 } // namespace gdata
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_protocol_handler.cc ('k') | chrome/browser/chromeos/gdata/mock_gdata_file_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698