OLD | NEW |
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 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
906 } | 906 } |
907 | 907 |
908 UserShare* SyncManagerImpl::GetUserShare() { | 908 UserShare* SyncManagerImpl::GetUserShare() { |
909 DCHECK(initialized_); | 909 DCHECK(initialized_); |
910 return &share_; | 910 return &share_; |
911 } | 911 } |
912 | 912 |
913 std::unique_ptr<syncer_v2::ModelTypeConnector> | 913 std::unique_ptr<syncer_v2::ModelTypeConnector> |
914 SyncManagerImpl::GetModelTypeConnectorProxy() { | 914 SyncManagerImpl::GetModelTypeConnectorProxy() { |
915 DCHECK(initialized_); | 915 DCHECK(initialized_); |
916 return base::WrapUnique(new syncer_v2::ModelTypeConnectorProxy( | 916 return base::MakeUnique<syncer_v2::ModelTypeConnectorProxy>( |
917 base::ThreadTaskRunnerHandle::Get(), model_type_registry_->AsWeakPtr())); | 917 base::ThreadTaskRunnerHandle::Get(), model_type_registry_->AsWeakPtr()); |
918 } | 918 } |
919 | 919 |
920 const std::string SyncManagerImpl::cache_guid() { | 920 const std::string SyncManagerImpl::cache_guid() { |
921 DCHECK(initialized_); | 921 DCHECK(initialized_); |
922 return directory()->cache_guid(); | 922 return directory()->cache_guid(); |
923 } | 923 } |
924 | 924 |
925 bool SyncManagerImpl::ReceivedExperiment(Experiments* experiments) { | 925 bool SyncManagerImpl::ReceivedExperiment(Experiments* experiments) { |
926 ReadTransaction trans(FROM_HERE, GetUserShare()); | 926 ReadTransaction trans(FROM_HERE, GetUserShare()); |
927 ReadNode nigori_node(&trans); | 927 ReadNode nigori_node(&trans); |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1009 } | 1009 } |
1010 | 1010 |
1011 void SyncManagerImpl::OnCookieJarChanged(bool account_mismatch, | 1011 void SyncManagerImpl::OnCookieJarChanged(bool account_mismatch, |
1012 bool empty_jar) { | 1012 bool empty_jar) { |
1013 DCHECK(thread_checker_.CalledOnValidThread()); | 1013 DCHECK(thread_checker_.CalledOnValidThread()); |
1014 session_context_->set_cookie_jar_mismatch(account_mismatch); | 1014 session_context_->set_cookie_jar_mismatch(account_mismatch); |
1015 session_context_->set_cookie_jar_empty(empty_jar); | 1015 session_context_->set_cookie_jar_empty(empty_jar); |
1016 } | 1016 } |
1017 | 1017 |
1018 } // namespace syncer | 1018 } // namespace syncer |
OLD | NEW |