| 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 #ifndef COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_IMPL_H_ | 5 #ifndef COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_IMPL_H_ |
| 6 #define COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_IMPL_H_ | 6 #define COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 8 #include <string> | 10 #include <string> |
| 9 | 11 |
| 10 #include "base/basictypes.h" | |
| 11 #include "base/callback.h" | 12 #include "base/callback.h" |
| 12 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/macros.h" |
| 13 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
| 15 #include "base/threading/thread.h" | 17 #include "base/threading/thread.h" |
| 16 #include "components/invalidation/public/invalidation_handler.h" | 18 #include "components/invalidation/public/invalidation_handler.h" |
| 17 #include "components/sync_driver/backend_data_type_configurer.h" | 19 #include "components/sync_driver/backend_data_type_configurer.h" |
| 18 #include "components/sync_driver/glue/sync_backend_host.h" | 20 #include "components/sync_driver/glue/sync_backend_host.h" |
| 19 #include "sync/internal_api/public/base/model_type.h" | 21 #include "sync/internal_api/public/base/model_type.h" |
| 20 #include "sync/internal_api/public/configure_reason.h" | 22 #include "sync/internal_api/public/configure_reason.h" |
| 21 #include "sync/internal_api/public/sessions/sync_session_snapshot.h" | 23 #include "sync/internal_api/public/sessions/sync_session_snapshot.h" |
| 22 #include "sync/internal_api/public/sessions/type_debug_info_observer.h" | 24 #include "sync/internal_api/public/sessions/type_debug_info_observer.h" |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 // Forwards a directory status counter update to the frontend loop. Will not | 215 // Forwards a directory status counter update to the frontend loop. Will not |
| 214 // be called unless a call to EnableDirectoryTypeDebugInfoForwarding() | 216 // be called unless a call to EnableDirectoryTypeDebugInfoForwarding() |
| 215 // explicitly requested that we start forwarding these events. | 217 // explicitly requested that we start forwarding these events. |
| 216 void HandleDirectoryStatusCountersUpdatedOnFrontendLoop( | 218 void HandleDirectoryStatusCountersUpdatedOnFrontendLoop( |
| 217 syncer::ModelType type, | 219 syncer::ModelType type, |
| 218 const syncer::StatusCounters& counters); | 220 const syncer::StatusCounters& counters); |
| 219 | 221 |
| 220 // Overwrites the kSyncInvalidationVersions preference with the most recent | 222 // Overwrites the kSyncInvalidationVersions preference with the most recent |
| 221 // set of invalidation versions for each type. | 223 // set of invalidation versions for each type. |
| 222 void UpdateInvalidationVersions( | 224 void UpdateInvalidationVersions( |
| 223 const std::map<syncer::ModelType, int64>& invalidation_versions); | 225 const std::map<syncer::ModelType, int64_t>& invalidation_versions); |
| 224 | 226 |
| 225 sync_driver::SyncFrontend* frontend() { | 227 sync_driver::SyncFrontend* frontend() { |
| 226 return frontend_; | 228 return frontend_; |
| 227 } | 229 } |
| 228 | 230 |
| 229 private: | 231 private: |
| 230 friend class SyncBackendHostCore; | 232 friend class SyncBackendHostCore; |
| 231 | 233 |
| 232 // Checks if we have received a notice to turn on experimental datatypes | 234 // Checks if we have received a notice to turn on experimental datatypes |
| 233 // (via the nigori node) and informs the frontend if that is the case. | 235 // (via the nigori node) and informs the frontend if that is the case. |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 bool invalidation_handler_registered_; | 371 bool invalidation_handler_registered_; |
| 370 | 372 |
| 371 base::WeakPtrFactory<SyncBackendHostImpl> weak_ptr_factory_; | 373 base::WeakPtrFactory<SyncBackendHostImpl> weak_ptr_factory_; |
| 372 | 374 |
| 373 DISALLOW_COPY_AND_ASSIGN(SyncBackendHostImpl); | 375 DISALLOW_COPY_AND_ASSIGN(SyncBackendHostImpl); |
| 374 }; | 376 }; |
| 375 | 377 |
| 376 } // namespace browser_sync | 378 } // namespace browser_sync |
| 377 | 379 |
| 378 #endif // COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_IMPL_H_ | 380 #endif // COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_HOST_IMPL_H_ |
| OLD | NEW |