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 "sync/internal_api/sync_manager.h" | 5 #include "sync/internal_api/sync_manager.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
840 | 840 |
841 bool SyncManager::IsUsingExplicitPassphrase() { | 841 bool SyncManager::IsUsingExplicitPassphrase() { |
842 return data_ && data_->IsUsingExplicitPassphrase(); | 842 return data_ && data_->IsUsingExplicitPassphrase(); |
843 } | 843 } |
844 | 844 |
845 void SyncManager::RequestCleanupDisabledTypes( | 845 void SyncManager::RequestCleanupDisabledTypes( |
846 const browser_sync::ModelSafeRoutingInfo& routing_info) { | 846 const browser_sync::ModelSafeRoutingInfo& routing_info) { |
847 DCHECK(thread_checker_.CalledOnValidThread()); | 847 DCHECK(thread_checker_.CalledOnValidThread()); |
848 if (data_->scheduler()) { | 848 if (data_->scheduler()) { |
849 data_->session_context()->set_routing_info(routing_info); | 849 data_->session_context()->set_routing_info(routing_info); |
850 data_->scheduler()->ScheduleCleanupDisabledTypes(); | 850 data_->scheduler()->CleanupDisabledTypes(); |
851 } | 851 } |
852 } | 852 } |
853 | 853 |
854 void SyncManager::RequestClearServerData() { | 854 void SyncManager::RequestClearServerData() { |
855 DCHECK(thread_checker_.CalledOnValidThread()); | 855 DCHECK(thread_checker_.CalledOnValidThread()); |
856 if (data_->scheduler()) | 856 if (data_->scheduler()) |
857 data_->scheduler()->ScheduleClearUserData(); | 857 data_->scheduler()->ClearUserData(); |
858 } | 858 } |
859 | 859 |
860 void SyncManager::RequestConfig( | 860 void SyncManager::RequestConfig( |
861 const browser_sync::ModelSafeRoutingInfo& routing_info, | 861 const browser_sync::ModelSafeRoutingInfo& routing_info, |
862 const ModelTypeSet& types, ConfigureReason reason) { | 862 const ModelTypeSet& types, ConfigureReason reason) { |
863 DCHECK(thread_checker_.CalledOnValidThread()); | 863 DCHECK(thread_checker_.CalledOnValidThread()); |
864 if (!data_->scheduler()) { | 864 if (!data_->scheduler()) { |
865 LOG(INFO) | 865 LOG(INFO) |
866 << "SyncManager::RequestConfig: bailing out because scheduler is " | 866 << "SyncManager::RequestConfig: bailing out because scheduler is " |
867 << "null"; | 867 << "null"; |
868 return; | 868 return; |
869 } | 869 } |
870 StartConfigurationMode(base::Closure()); | 870 StartConfigurationMode(base::Closure()); |
871 data_->session_context()->set_routing_info(routing_info); | 871 data_->session_context()->set_routing_info(routing_info); |
872 data_->scheduler()->ScheduleConfig(types, GetSourceFromReason(reason)); | 872 data_->scheduler()->Configure(types, GetSourceFromReason(reason)); |
873 } | 873 } |
874 | 874 |
875 void SyncManager::StartConfigurationMode(const base::Closure& callback) { | 875 void SyncManager::StartConfigurationMode(const base::Closure& callback) { |
876 DCHECK(thread_checker_.CalledOnValidThread()); | 876 DCHECK(thread_checker_.CalledOnValidThread()); |
877 if (!data_->scheduler()) { | 877 if (!data_->scheduler()) { |
878 LOG(INFO) | 878 LOG(INFO) |
879 << "SyncManager::StartConfigurationMode: could not start " | 879 << "SyncManager::StartConfigurationMode: could not start " |
880 << "configuration mode because because scheduler is null"; | 880 << "configuration mode because because scheduler is null"; |
881 return; | 881 return; |
882 } | 882 } |
(...skipping 1619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2502 share->directory->GetDownloadProgress(i.Get(), &marker); | 2502 share->directory->GetDownloadProgress(i.Get(), &marker); |
2503 | 2503 |
2504 if (marker.token().empty()) | 2504 if (marker.token().empty()) |
2505 result.Put(i.Get()); | 2505 result.Put(i.Get()); |
2506 | 2506 |
2507 } | 2507 } |
2508 return result; | 2508 return result; |
2509 } | 2509 } |
2510 | 2510 |
2511 } // namespace sync_api | 2511 } // namespace sync_api |
OLD | NEW |