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

Side by Side Diff: components/sync/core_impl/sync_manager_impl.cc

Issue 2256733004: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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/sync/core_impl/sync_manager_impl.h" 5 #include "components/sync/core_impl/sync_manager_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 } 905 }
906 906
907 UserShare* SyncManagerImpl::GetUserShare() { 907 UserShare* SyncManagerImpl::GetUserShare() {
908 DCHECK(initialized_); 908 DCHECK(initialized_);
909 return &share_; 909 return &share_;
910 } 910 }
911 911
912 std::unique_ptr<syncer_v2::ModelTypeConnector> 912 std::unique_ptr<syncer_v2::ModelTypeConnector>
913 SyncManagerImpl::GetModelTypeConnectorProxy() { 913 SyncManagerImpl::GetModelTypeConnectorProxy() {
914 DCHECK(initialized_); 914 DCHECK(initialized_);
915 return base::WrapUnique(new syncer_v2::ModelTypeConnectorProxy( 915 return base::MakeUnique<syncer_v2::ModelTypeConnectorProxy>(
916 base::ThreadTaskRunnerHandle::Get(), model_type_registry_->AsWeakPtr())); 916 base::ThreadTaskRunnerHandle::Get(), model_type_registry_->AsWeakPtr());
917 } 917 }
918 918
919 const std::string SyncManagerImpl::cache_guid() { 919 const std::string SyncManagerImpl::cache_guid() {
920 DCHECK(initialized_); 920 DCHECK(initialized_);
921 return directory()->cache_guid(); 921 return directory()->cache_guid();
922 } 922 }
923 923
924 bool SyncManagerImpl::ReceivedExperiment(Experiments* experiments) { 924 bool SyncManagerImpl::ReceivedExperiment(Experiments* experiments) {
925 ReadTransaction trans(FROM_HERE, GetUserShare()); 925 ReadTransaction trans(FROM_HERE, GetUserShare());
926 ReadNode nigori_node(&trans); 926 ReadNode nigori_node(&trans);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
1008 } 1008 }
1009 1009
1010 void SyncManagerImpl::OnCookieJarChanged(bool account_mismatch, 1010 void SyncManagerImpl::OnCookieJarChanged(bool account_mismatch,
1011 bool empty_jar) { 1011 bool empty_jar) {
1012 DCHECK(thread_checker_.CalledOnValidThread()); 1012 DCHECK(thread_checker_.CalledOnValidThread());
1013 cycle_context_->set_cookie_jar_mismatch(account_mismatch); 1013 cycle_context_->set_cookie_jar_mismatch(account_mismatch);
1014 cycle_context_->set_cookie_jar_empty(empty_jar); 1014 cycle_context_->set_cookie_jar_empty(empty_jar);
1015 } 1015 }
1016 1016
1017 } // namespace syncer 1017 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/core_impl/model_type_connector_proxy_unittest.cc ('k') | components/sync/core_impl/test/fake_sync_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698