OLD | NEW |
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/glue/sync_backend_host_core.h" | 5 #include "chrome/browser/sync/glue/sync_backend_host_core.h" |
6 | 6 |
7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 } | 292 } |
293 | 293 |
294 void SyncBackendHostCore::OnPassphraseTypeChanged( | 294 void SyncBackendHostCore::OnPassphraseTypeChanged( |
295 syncer::PassphraseType type, base::Time passphrase_time) { | 295 syncer::PassphraseType type, base::Time passphrase_time) { |
296 host_.Call( | 296 host_.Call( |
297 FROM_HERE, | 297 FROM_HERE, |
298 &SyncBackendHostImpl::HandlePassphraseTypeChangedOnFrontendLoop, | 298 &SyncBackendHostImpl::HandlePassphraseTypeChangedOnFrontendLoop, |
299 type, passphrase_time); | 299 type, passphrase_time); |
300 } | 300 } |
301 | 301 |
| 302 void SyncBackendHostCore::OnLocalSetPassphraseEncryption( |
| 303 const syncer::SyncEncryptionHandler::NigoriState& nigori_state) { |
| 304 host_.Call( |
| 305 FROM_HERE, |
| 306 &SyncBackendHostImpl::HandleLocalSetPassphraseEncryptionOnFrontendLoop, |
| 307 nigori_state); |
| 308 } |
| 309 |
302 void SyncBackendHostCore::OnCommitCountersUpdated( | 310 void SyncBackendHostCore::OnCommitCountersUpdated( |
303 syncer::ModelType type, | 311 syncer::ModelType type, |
304 const syncer::CommitCounters& counters) { | 312 const syncer::CommitCounters& counters) { |
305 host_.Call( | 313 host_.Call( |
306 FROM_HERE, | 314 FROM_HERE, |
307 &SyncBackendHostImpl::HandleDirectoryCommitCountersUpdatedOnFrontendLoop, | 315 &SyncBackendHostImpl::HandleDirectoryCommitCountersUpdatedOnFrontendLoop, |
308 type, counters); | 316 type, counters); |
309 } | 317 } |
310 | 318 |
311 void SyncBackendHostCore::OnUpdateCountersUpdated( | 319 void SyncBackendHostCore::OnUpdateCountersUpdated( |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
724 base::TimeDelta::FromSeconds(kSaveChangesIntervalSeconds), | 732 base::TimeDelta::FromSeconds(kSaveChangesIntervalSeconds), |
725 this, &SyncBackendHostCore::SaveChanges); | 733 this, &SyncBackendHostCore::SaveChanges); |
726 } | 734 } |
727 | 735 |
728 void SyncBackendHostCore::SaveChanges() { | 736 void SyncBackendHostCore::SaveChanges() { |
729 DCHECK_EQ(base::MessageLoop::current(), sync_loop_); | 737 DCHECK_EQ(base::MessageLoop::current(), sync_loop_); |
730 sync_manager_->SaveChanges(); | 738 sync_manager_->SaveChanges(); |
731 } | 739 } |
732 | 740 |
733 } // namespace browser_sync | 741 } // namespace browser_sync |
OLD | NEW |