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_INTERNAL_API_ALL_STATUS_H_ | 8 #ifndef SYNC_INTERNAL_API_ALL_STATUS_H_ |
9 #define SYNC_INTERNAL_API_ALL_STATUS_H_ | 9 #define SYNC_INTERNAL_API_ALL_STATUS_H_ |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 // see any state in mid-sync cycle. We have no plans to change this. However, | 34 // see any state in mid-sync cycle. We have no plans to change this. However, |
35 // we will continue to collect data and update state mid-sync-cycle in case we | 35 // we will continue to collect data and update state mid-sync-cycle in case we |
36 // need to debug slow or stuck sync cycles. | 36 // need to debug slow or stuck sync cycles. |
37 class AllStatus : public SyncEngineEventListener { | 37 class AllStatus : public SyncEngineEventListener { |
38 friend class ScopedStatusLock; | 38 friend class ScopedStatusLock; |
39 public: | 39 public: |
40 AllStatus(); | 40 AllStatus(); |
41 virtual ~AllStatus(); | 41 virtual ~AllStatus(); |
42 | 42 |
43 // SyncEngineEventListener implementation. | 43 // SyncEngineEventListener implementation. |
44 virtual void OnSyncCycleEvent(const SyncCycleEvent& event) OVERRIDE; | 44 virtual void OnSyncCycleEvent(const SyncCycleEvent& event) override; |
45 virtual void OnActionableError(const SyncProtocolError& error) OVERRIDE; | 45 virtual void OnActionableError(const SyncProtocolError& error) override; |
46 virtual void OnRetryTimeChanged(base::Time retry_time) OVERRIDE; | 46 virtual void OnRetryTimeChanged(base::Time retry_time) override; |
47 virtual void OnThrottledTypesChanged(ModelTypeSet throttled_types) OVERRIDE; | 47 virtual void OnThrottledTypesChanged(ModelTypeSet throttled_types) override; |
48 virtual void OnMigrationRequested(ModelTypeSet types) OVERRIDE; | 48 virtual void OnMigrationRequested(ModelTypeSet types) override; |
49 virtual void OnProtocolEvent(const ProtocolEvent& event) OVERRIDE; | 49 virtual void OnProtocolEvent(const ProtocolEvent& event) override; |
50 | 50 |
51 SyncStatus status() const; | 51 SyncStatus status() const; |
52 | 52 |
53 void SetNotificationsEnabled(bool notifications_enabled); | 53 void SetNotificationsEnabled(bool notifications_enabled); |
54 | 54 |
55 void IncrementNotifiableCommits(); | 55 void IncrementNotifiableCommits(); |
56 | 56 |
57 void IncrementNotificationsReceived(); | 57 void IncrementNotificationsReceived(); |
58 | 58 |
59 void SetEncryptedTypes(ModelTypeSet types); | 59 void SetEncryptedTypes(ModelTypeSet types); |
(...skipping 24 matching lines...) Expand all Loading... |
84 public: | 84 public: |
85 explicit ScopedStatusLock(AllStatus* allstatus); | 85 explicit ScopedStatusLock(AllStatus* allstatus); |
86 ~ScopedStatusLock(); | 86 ~ScopedStatusLock(); |
87 protected: | 87 protected: |
88 AllStatus* allstatus_; | 88 AllStatus* allstatus_; |
89 }; | 89 }; |
90 | 90 |
91 } // namespace syncer | 91 } // namespace syncer |
92 | 92 |
93 #endif // SYNC_INTERNAL_API_ALL_STATUS_H_ | 93 #endif // SYNC_INTERNAL_API_ALL_STATUS_H_ |
OLD | NEW |