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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/sync_worker.cc

Issue 660873002: Use scoped_ptr::Pass instead of scoped_ptr::PassAs<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/sync_file_system/drive_backend/sync_worker.h" 5 #include "chrome/browser/sync_file_system/drive_backend/sync_worker.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "chrome/browser/drive/drive_service_interface.h" 10 #include "chrome/browser/drive/drive_service_interface.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 PostInitializeTask(); 88 PostInitializeTask();
89 89
90 scoped_ptr<RegisterAppTask> task( 90 scoped_ptr<RegisterAppTask> task(
91 new RegisterAppTask(context_.get(), origin.host())); 91 new RegisterAppTask(context_.get(), origin.host()));
92 if (task->CanFinishImmediately()) { 92 if (task->CanFinishImmediately()) {
93 callback.Run(SYNC_STATUS_OK); 93 callback.Run(SYNC_STATUS_OK);
94 return; 94 return;
95 } 95 }
96 96
97 task_manager_->ScheduleSyncTask( 97 task_manager_->ScheduleSyncTask(
98 FROM_HERE, 98 FROM_HERE, task.Pass(), SyncTaskManager::PRIORITY_HIGH, callback);
99 task.PassAs<SyncTask>(),
100 SyncTaskManager::PRIORITY_HIGH,
101 callback);
102 } 99 }
103 100
104 void SyncWorker::EnableOrigin( 101 void SyncWorker::EnableOrigin(
105 const GURL& origin, 102 const GURL& origin,
106 const SyncStatusCallback& callback) { 103 const SyncStatusCallback& callback) {
107 DCHECK(sequence_checker_.CalledOnValidSequencedThread()); 104 DCHECK(sequence_checker_.CalledOnValidSequencedThread());
108 105
109 task_manager_->ScheduleTask( 106 task_manager_->ScheduleTask(
110 FROM_HERE, 107 FROM_HERE,
111 base::Bind(&SyncWorker::DoEnableApp, 108 base::Bind(&SyncWorker::DoEnableApp,
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 return context_->GetDriveUploader(); 714 return context_->GetDriveUploader();
718 } 715 }
719 716
720 MetadataDatabase* SyncWorker::GetMetadataDatabase() { 717 MetadataDatabase* SyncWorker::GetMetadataDatabase() {
721 DCHECK(sequence_checker_.CalledOnValidSequencedThread()); 718 DCHECK(sequence_checker_.CalledOnValidSequencedThread());
722 return context_->GetMetadataDatabase(); 719 return context_->GetMetadataDatabase();
723 } 720 }
724 721
725 } // namespace drive_backend 722 } // namespace drive_backend
726 } // namespace sync_file_system 723 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698