| 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 CHROME_BROWSER_SYNC_ENGINE_ALL_STATUS_H_ | 8 #ifndef CHROME_BROWSER_SYNC_ENGINE_ALL_STATUS_H_ |
| 9 #define CHROME_BROWSER_SYNC_ENGINE_ALL_STATUS_H_ | 9 #define CHROME_BROWSER_SYNC_ENGINE_ALL_STATUS_H_ |
| 10 #pragma once | 10 #pragma once |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 // cycle are more visible. Without such a change, the status summary for a | 33 // cycle are more visible. Without such a change, the status summary for a |
| 34 // healthy syncer will constantly display as "READY" and never provide any | 34 // healthy syncer will constantly display as "READY" and never provide any |
| 35 // indication of a sync cycle being performed. See crbug.com/108100. | 35 // indication of a sync cycle being performed. See crbug.com/108100. |
| 36 | 36 |
| 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 void HandleServerConnectionEvent(const ServerConnectionEvent& event); | |
| 44 | |
| 45 virtual void OnSyncEngineEvent(const SyncEngineEvent& event) OVERRIDE; | 43 virtual void OnSyncEngineEvent(const SyncEngineEvent& event) OVERRIDE; |
| 46 | 44 |
| 47 sync_api::SyncManager::Status status() const; | 45 sync_api::SyncManager::Status status() const; |
| 48 | 46 |
| 49 void SetNotificationsEnabled(bool notifications_enabled); | 47 void SetNotificationsEnabled(bool notifications_enabled); |
| 50 | 48 |
| 51 void IncrementNotifiableCommits(); | 49 void IncrementNotifiableCommits(); |
| 52 | 50 |
| 53 void IncrementNotificationsReceived(); | 51 void IncrementNotificationsReceived(); |
| 54 | 52 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 77 public: | 75 public: |
| 78 explicit ScopedStatusLock(AllStatus* allstatus); | 76 explicit ScopedStatusLock(AllStatus* allstatus); |
| 79 ~ScopedStatusLock(); | 77 ~ScopedStatusLock(); |
| 80 protected: | 78 protected: |
| 81 AllStatus* allstatus_; | 79 AllStatus* allstatus_; |
| 82 }; | 80 }; |
| 83 | 81 |
| 84 } // namespace browser_sync | 82 } // namespace browser_sync |
| 85 | 83 |
| 86 #endif // CHROME_BROWSER_SYNC_ENGINE_ALL_STATUS_H_ | 84 #endif // CHROME_BROWSER_SYNC_ENGINE_ALL_STATUS_H_ |
| OLD | NEW |