| 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/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "chrome/browser/sync/glue/device_info.h" | 9 #include "chrome/browser/sync/glue/device_info.h" |
| 10 #include "chrome/browser/sync/glue/invalidation_adapter.h" | 10 #include "chrome/browser/sync/glue/invalidation_adapter.h" |
| 11 #include "chrome/browser/sync/glue/sync_backend_registrar.h" | 11 #include "chrome/browser/sync/glue/sync_backend_registrar.h" |
| 12 #include "chrome/browser/sync/glue/synced_device_tracker.h" | 12 #include "chrome/browser/sync/glue/synced_device_tracker.h" |
| 13 #include "chrome/common/chrome_version_info.h" | 13 #include "chrome/common/chrome_version_info.h" |
| 14 #include "components/invalidation/object_id_invalidation_map.h" |
| 15 #include "sync/internal_api/public/base/invalidation_util.h" |
| 14 #include "sync/internal_api/public/events/protocol_event.h" | 16 #include "sync/internal_api/public/events/protocol_event.h" |
| 15 #include "sync/internal_api/public/http_post_provider_factory.h" | 17 #include "sync/internal_api/public/http_post_provider_factory.h" |
| 16 #include "sync/internal_api/public/internal_components_factory.h" | 18 #include "sync/internal_api/public/internal_components_factory.h" |
| 17 #include "sync/internal_api/public/sessions/commit_counters.h" | 19 #include "sync/internal_api/public/sessions/commit_counters.h" |
| 18 #include "sync/internal_api/public/sessions/status_counters.h" | 20 #include "sync/internal_api/public/sessions/status_counters.h" |
| 19 #include "sync/internal_api/public/sessions/sync_session_snapshot.h" | 21 #include "sync/internal_api/public/sessions/sync_session_snapshot.h" |
| 20 #include "sync/internal_api/public/sessions/update_counters.h" | 22 #include "sync/internal_api/public/sessions/update_counters.h" |
| 21 #include "sync/internal_api/public/sync_context_proxy.h" | 23 #include "sync/internal_api/public/sync_context_proxy.h" |
| 22 #include "sync/internal_api/public/sync_manager.h" | 24 #include "sync/internal_api/public/sync_manager.h" |
| 23 #include "sync/internal_api/public/sync_manager_factory.h" | 25 #include "sync/internal_api/public/sync_manager_factory.h" |
| 24 #include "sync/notifier/invalidation_util.h" | |
| 25 #include "sync/notifier/object_id_invalidation_map.h" | |
| 26 | 26 |
| 27 // Helper macros to log with the syncer thread name; useful when there | 27 // Helper macros to log with the syncer thread name; useful when there |
| 28 // are multiple syncers involved. | 28 // are multiple syncers involved. |
| 29 | 29 |
| 30 #define SLOG(severity) LOG(severity) << name_ << ": " | 30 #define SLOG(severity) LOG(severity) << name_ << ": " |
| 31 | 31 |
| 32 #define SDVLOG(verbose_level) DVLOG(verbose_level) << name_ << ": " | 32 #define SDVLOG(verbose_level) DVLOG(verbose_level) << name_ << ": " |
| 33 | 33 |
| 34 static const int kSaveChangesIntervalSeconds = 10; | 34 static const int kSaveChangesIntervalSeconds = 10; |
| 35 | 35 |
| (...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 741 this, &SyncBackendHostCore::SaveChanges); | 741 this, &SyncBackendHostCore::SaveChanges); |
| 742 } | 742 } |
| 743 | 743 |
| 744 void SyncBackendHostCore::SaveChanges() { | 744 void SyncBackendHostCore::SaveChanges() { |
| 745 DCHECK_EQ(base::MessageLoop::current(), sync_loop_); | 745 DCHECK_EQ(base::MessageLoop::current(), sync_loop_); |
| 746 sync_manager_->SaveChanges(); | 746 sync_manager_->SaveChanges(); |
| 747 } | 747 } |
| 748 | 748 |
| 749 } // namespace browser_sync | 749 } // namespace browser_sync |
| 750 | 750 |
| OLD | NEW |