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 "components/sync/driver/glue/sync_backend_host_core.h" | 5 #include "components/sync/driver/glue/sync_backend_host_core.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
11 #include "base/location.h" | 11 #include "base/location.h" |
12 #include "base/memory/ptr_util.h" | 12 #include "base/memory/ptr_util.h" |
13 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
14 #include "components/data_use_measurement/core/data_use_user_data.h" | 14 #include "components/data_use_measurement/core/data_use_user_data.h" |
15 #include "components/invalidation/public/invalidation_util.h" | 15 #include "components/invalidation/public/invalidation_util.h" |
16 #include "components/invalidation/public/object_id_invalidation_map.h" | 16 #include "components/invalidation/public/object_id_invalidation_map.h" |
17 #include "components/sync/core/http_post_provider_factory.h" | 17 #include "components/sync/core/http_post_provider_factory.h" |
18 #include "components/sync/core/internal_components_factory.h" | 18 #include "components/sync/core/internal_components_factory.h" |
19 #include "components/sync/core/sync_manager.h" | 19 #include "components/sync/core/sync_manager.h" |
20 #include "components/sync/core/sync_manager_factory.h" | 20 #include "components/sync/core/sync_manager_factory.h" |
21 #include "components/sync/device_info/local_device_info_provider_impl.h" | 21 #include "components/sync/device_info/local_device_info_provider_impl.h" |
22 #include "components/sync/driver/glue/sync_backend_registrar.h" | 22 #include "components/sync/driver/glue/sync_backend_registrar.h" |
23 #include "components/sync/driver/invalidation_adapter.h" | 23 #include "components/sync/driver/invalidation_adapter.h" |
24 #include "components/sync/engine/cycle/commit_counters.h" | 24 #include "components/sync/engine/cycle/commit_counters.h" |
25 #include "components/sync/engine/cycle/status_counters.h" | 25 #include "components/sync/engine/cycle/status_counters.h" |
26 #include "components/sync/engine/cycle/sync_cycle_snapshot.h" | 26 #include "components/sync/engine/cycle/sync_cycle_snapshot.h" |
27 #include "components/sync/engine/cycle/update_counters.h" | 27 #include "components/sync/engine/cycle/update_counters.h" |
28 #include "components/sync/engine/events/protocol_event.h" | 28 #include "components/sync/engine/events/protocol_event.h" |
29 #include "url/gurl.h" | |
30 | 29 |
31 // Helper macros to log with the syncer thread name; useful when there | 30 // Helper macros to log with the syncer thread name; useful when there |
32 // are multiple syncers involved. | 31 // are multiple syncers involved. |
33 | 32 |
34 #define SLOG(severity) LOG(severity) << name_ << ": " | 33 #define SLOG(severity) LOG(severity) << name_ << ": " |
35 | 34 |
36 #define SDVLOG(verbose_level) DVLOG(verbose_level) << name_ << ": " | 35 #define SDVLOG(verbose_level) DVLOG(verbose_level) << name_ << ": " |
37 | 36 |
38 static const int kSaveChangesIntervalSeconds = 10; | 37 static const int kSaveChangesIntervalSeconds = 10; |
39 | 38 |
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
695 } | 694 } |
696 | 695 |
697 void SyncBackendHostCore::ClearServerDataDone( | 696 void SyncBackendHostCore::ClearServerDataDone( |
698 const base::Closure& frontend_callback) { | 697 const base::Closure& frontend_callback) { |
699 DCHECK(sync_loop_->task_runner()->BelongsToCurrentThread()); | 698 DCHECK(sync_loop_->task_runner()->BelongsToCurrentThread()); |
700 host_.Call(FROM_HERE, &SyncBackendHostImpl::ClearServerDataDoneOnFrontendLoop, | 699 host_.Call(FROM_HERE, &SyncBackendHostImpl::ClearServerDataDoneOnFrontendLoop, |
701 frontend_callback); | 700 frontend_callback); |
702 } | 701 } |
703 | 702 |
704 } // namespace browser_sync | 703 } // namespace browser_sync |
OLD | NEW |