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

Side by Side Diff: components/browser_sync/browser/profile_sync_components_factory_impl.cc

Issue 2256813005: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 "components/browser_sync/browser/profile_sync_components_factory_impl.h " 5 #include "components/browser_sync/browser/profile_sync_components_factory_impl.h "
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 const std::string& name, 287 const std::string& name,
288 invalidation::InvalidationService* invalidator, 288 invalidation::InvalidationService* invalidator,
289 const base::WeakPtr<sync_driver::SyncPrefs>& sync_prefs, 289 const base::WeakPtr<sync_driver::SyncPrefs>& sync_prefs,
290 const base::FilePath& sync_folder) { 290 const base::FilePath& sync_folder) {
291 return new browser_sync::SyncBackendHostImpl( 291 return new browser_sync::SyncBackendHostImpl(
292 name, sync_client_, ui_thread_, invalidator, sync_prefs, sync_folder); 292 name, sync_client_, ui_thread_, invalidator, sync_prefs, sync_folder);
293 } 293 }
294 294
295 std::unique_ptr<sync_driver::LocalDeviceInfoProvider> 295 std::unique_ptr<sync_driver::LocalDeviceInfoProvider>
296 ProfileSyncComponentsFactoryImpl::CreateLocalDeviceInfoProvider() { 296 ProfileSyncComponentsFactoryImpl::CreateLocalDeviceInfoProvider() {
297 return base::WrapUnique( 297 return base::MakeUnique<browser_sync::LocalDeviceInfoProviderImpl>(
298 new browser_sync::LocalDeviceInfoProviderImpl(channel_, version_, 298 channel_, version_, is_tablet_);
299 is_tablet_));
300 } 299 }
301 300
302 class TokenServiceProvider 301 class TokenServiceProvider
303 : public OAuth2TokenServiceRequest::TokenServiceProvider { 302 : public OAuth2TokenServiceRequest::TokenServiceProvider {
304 public: 303 public:
305 TokenServiceProvider( 304 TokenServiceProvider(
306 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 305 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
307 OAuth2TokenService* token_service); 306 OAuth2TokenService* token_service);
308 307
309 // OAuth2TokenServiceRequest::TokenServiceProvider implementation. 308 // OAuth2TokenServiceRequest::TokenServiceProvider implementation.
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 #else 396 #else
398 const bool kExpectMobileBookmarksFolder = false; 397 const bool kExpectMobileBookmarksFolder = false;
399 #endif 398 #endif
400 BookmarkModelAssociator* model_associator = new BookmarkModelAssociator( 399 BookmarkModelAssociator* model_associator = new BookmarkModelAssociator(
401 bookmark_model, sync_service->GetSyncClient(), user_share, error_handler, 400 bookmark_model, sync_service->GetSyncClient(), user_share, error_handler,
402 kExpectMobileBookmarksFolder); 401 kExpectMobileBookmarksFolder);
403 BookmarkChangeProcessor* change_processor = new BookmarkChangeProcessor( 402 BookmarkChangeProcessor* change_processor = new BookmarkChangeProcessor(
404 sync_service->GetSyncClient(), model_associator, error_handler); 403 sync_service->GetSyncClient(), model_associator, error_handler);
405 return SyncComponents(model_associator, change_processor); 404 return SyncComponents(model_associator, change_processor);
406 } 405 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698