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

Side by Side Diff: chrome/browser/chromeos/drive/file_system/copy_operation.cc

Issue 546303003: Remove implicit conversions from scoped_refptr to T* in c/b/chromeos/drive (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 (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/drive/file_system/copy_operation.h" 5 #include "chrome/browser/chromeos/drive/file_system/copy_operation.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/task_runner_util.h" 9 #include "base/task_runner_util.h"
10 #include "chrome/browser/chromeos/drive/drive.pb.h" 10 #include "chrome/browser/chromeos/drive/drive.pb.h"
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 366 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
367 DCHECK(!params.callback.is_null()); 367 DCHECK(!params.callback.is_null());
368 368
369 if (error != FILE_ERROR_OK) { 369 if (error != FILE_ERROR_OK) {
370 params.callback.Run(error); 370 params.callback.Run(error);
371 return; 371 return;
372 } 372 }
373 373
374 ResourceEntry* parent = new ResourceEntry; 374 ResourceEntry* parent = new ResourceEntry;
375 base::PostTaskAndReplyWithResult( 375 base::PostTaskAndReplyWithResult(
376 blocking_task_runner_, 376 blocking_task_runner_.get(),
377 FROM_HERE, 377 FROM_HERE,
378 base::Bind(&internal::ResourceMetadata::GetResourceEntryById, 378 base::Bind(&internal::ResourceMetadata::GetResourceEntryById,
379 base::Unretained(metadata_), 379 base::Unretained(metadata_),
380 params.parent_entry.local_id(), parent), 380 params.parent_entry.local_id(),
381 parent),
381 base::Bind(&CopyOperation::CopyAfterGetParentResourceId, 382 base::Bind(&CopyOperation::CopyAfterGetParentResourceId,
382 weak_ptr_factory_.GetWeakPtr(), params, base::Owned(parent))); 383 weak_ptr_factory_.GetWeakPtr(),
384 params,
385 base::Owned(parent)));
383 } 386 }
384 387
385 void CopyOperation::CopyAfterGetParentResourceId(const CopyParams& params, 388 void CopyOperation::CopyAfterGetParentResourceId(const CopyParams& params,
386 const ResourceEntry* parent, 389 const ResourceEntry* parent,
387 FileError error) { 390 FileError error) {
388 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 391 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
389 DCHECK(!params.callback.is_null()); 392 DCHECK(!params.callback.is_null());
390 393
391 if (error != FILE_ERROR_OK) { 394 if (error != FILE_ERROR_OK) {
392 params.callback.Run(error); 395 params.callback.Run(error);
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 FileChange changed_file; 661 FileChange changed_file;
659 changed_file.Update(remote_dest_path, *entry, FileChange::ADD_OR_UPDATE); 662 changed_file.Update(remote_dest_path, *entry, FileChange::ADD_OR_UPDATE);
660 delegate_->OnFileChangedByOperation(changed_file); 663 delegate_->OnFileChangedByOperation(changed_file);
661 delegate_->OnEntryUpdatedByOperation(*local_id); 664 delegate_->OnEntryUpdatedByOperation(*local_id);
662 } 665 }
663 callback.Run(error); 666 callback.Run(error);
664 } 667 }
665 668
666 } // namespace file_system 669 } // namespace file_system
667 } // namespace drive 670 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/file_system.cc ('k') | chrome/browser/chromeos/drive/sync_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698