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

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

Issue 608133002: [SyncFS] Use nullptr for scoped_ptr initialization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nullptr
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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_engine.h" 5 #include "chrome/browser/sync_file_system/drive_backend/sync_engine.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 if (!signin_manager_ || !signin_manager_->IsAuthenticated()) 277 if (!signin_manager_ || !signin_manager_->IsAuthenticated())
278 return; 278 return;
279 279
280 DCHECK(drive_service_factory_); 280 DCHECK(drive_service_factory_);
281 scoped_ptr<drive::DriveServiceInterface> drive_service = 281 scoped_ptr<drive::DriveServiceInterface> drive_service =
282 drive_service_factory_->CreateDriveService( 282 drive_service_factory_->CreateDriveService(
283 token_service_, request_context_.get(), drive_task_runner_.get()); 283 token_service_, request_context_.get(), drive_task_runner_.get());
284 scoped_ptr<drive::DriveUploaderInterface> drive_uploader( 284 scoped_ptr<drive::DriveUploaderInterface> drive_uploader(
285 new drive::DriveUploader(drive_service.get(), drive_task_runner_.get())); 285 new drive::DriveUploader(drive_service.get(), drive_task_runner_.get()));
286 286
287 InitializeInternal(drive_service.Pass(), drive_uploader.Pass(), 287 InitializeInternal(drive_service.Pass(), drive_uploader.Pass(), nullptr);
288 scoped_ptr<SyncWorkerInterface>());
289 } 288 }
290 289
291 void SyncEngine::InitializeForTesting( 290 void SyncEngine::InitializeForTesting(
292 scoped_ptr<drive::DriveServiceInterface> drive_service, 291 scoped_ptr<drive::DriveServiceInterface> drive_service,
293 scoped_ptr<drive::DriveUploaderInterface> drive_uploader, 292 scoped_ptr<drive::DriveUploaderInterface> drive_uploader,
294 scoped_ptr<SyncWorkerInterface> sync_worker) { 293 scoped_ptr<SyncWorkerInterface> sync_worker) {
295 Reset(); 294 Reset();
296 InitializeInternal(drive_service.Pass(), drive_uploader.Pass(), 295 InitializeInternal(drive_service.Pass(), drive_uploader.Pass(),
297 sync_worker.Pass()); 296 sync_worker.Pass());
298 } 297 }
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 800
802 SyncStatusCallback SyncEngine::TrackCallback( 801 SyncStatusCallback SyncEngine::TrackCallback(
803 const SyncStatusCallback& callback) { 802 const SyncStatusCallback& callback) {
804 return callback_tracker_.Register( 803 return callback_tracker_.Register(
805 base::Bind(callback, SYNC_STATUS_ABORT), 804 base::Bind(callback, SYNC_STATUS_ABORT),
806 callback); 805 callback);
807 } 806 }
808 807
809 } // namespace drive_backend 808 } // namespace drive_backend
810 } // namespace sync_file_system 809 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698