| 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 // The AllStatus object watches various sync engine components and aggregates | 5 // The AllStatus object watches various sync engine components and aggregates |
| 6 // the status of all of them into one place. | 6 // the status of all of them into one place. |
| 7 | 7 |
| 8 #ifndef SYNC_ENGINE_ALL_STATUS_H_ | 8 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_ALL_STATUS_H_ |
| 9 #define SYNC_ENGINE_ALL_STATUS_H_ | 9 #define COMPONENTS_SYNC_ENGINE_IMPL_ALL_STATUS_H_ |
| 10 | 10 |
| 11 #include <map> | 11 #include <map> |
| 12 #include <string> | 12 #include <string> |
| 13 | 13 |
| 14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/synchronization/lock.h" | 16 #include "base/synchronization/lock.h" |
| 17 #include "sync/engine/nudge_source.h" | 17 #include "components/sync/base/model_type.h" |
| 18 #include "sync/engine/sync_engine_event_listener.h" | 18 #include "components/sync/engine/sync_status.h" |
| 19 #include "sync/engine/syncer_types.h" | 19 #include "components/sync/engine_impl/nudge_source.h" |
| 20 #include "sync/internal_api/public/base/model_type.h" | 20 #include "components/sync/engine_impl/sync_engine_event_listener.h" |
| 21 #include "sync/internal_api/public/engine/sync_status.h" | 21 #include "components/sync/engine_impl/syncer_types.h" |
| 22 | 22 |
| 23 namespace syncer { | 23 namespace syncer { |
| 24 | 24 |
| 25 class ScopedStatusLock; | 25 class ScopedStatusLock; |
| 26 struct ServerConnectionEvent; | 26 struct ServerConnectionEvent; |
| 27 struct SyncCycleEvent; | 27 struct SyncCycleEvent; |
| 28 | 28 |
| 29 // This class collects data and uses it to update its internal state. It can | 29 // This class collects data and uses it to update its internal state. It can |
| 30 // return a snapshot of this state as a SyncerStatus object. | 30 // return a snapshot of this state as a SyncerStatus object. |
| 31 // | 31 // |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 private: | 81 private: |
| 82 friend class ScopedStatusLock; | 82 friend class ScopedStatusLock; |
| 83 | 83 |
| 84 DISALLOW_COPY_AND_ASSIGN(AllStatus); | 84 DISALLOW_COPY_AND_ASSIGN(AllStatus); |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 class ScopedStatusLock { | 87 class ScopedStatusLock { |
| 88 public: | 88 public: |
| 89 explicit ScopedStatusLock(AllStatus* allstatus); | 89 explicit ScopedStatusLock(AllStatus* allstatus); |
| 90 ~ScopedStatusLock(); | 90 ~ScopedStatusLock(); |
| 91 |
| 91 protected: | 92 protected: |
| 92 AllStatus* allstatus_; | 93 AllStatus* allstatus_; |
| 93 }; | 94 }; |
| 94 | 95 |
| 95 } // namespace syncer | 96 } // namespace syncer |
| 96 | 97 |
| 97 #endif // SYNC_ENGINE_ALL_STATUS_H_ | 98 #endif // COMPONENTS_SYNC_ENGINE_IMPL_ALL_STATUS_H_ |
| OLD | NEW |