| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 |
| 11 | 11 |
| 12 #include <map> | 12 #include <map> |
| 13 | 13 |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/synchronization/lock.h" | 15 #include "base/synchronization/lock.h" |
| 16 #include "chrome/browser/sync/engine/syncer_types.h" | 16 #include "chrome/browser/sync/engine/syncer_types.h" |
| 17 #include "chrome/browser/sync/internal_api/sync_manager.h" | 17 #include "chrome/browser/sync/internal_api/sync_manager.h" |
| 18 #include "chrome/browser/sync/syncable/model_type.h" | 18 #include "chrome/browser/sync/syncable/model_type.h" |
| 19 | 19 |
| 20 namespace browser_sync { | 20 namespace browser_sync { |
| 21 | 21 |
| 22 class ScopedStatusLock; | 22 class ScopedStatusLock; |
| 23 class ServerConnectionManager; | |
| 24 class Syncer; | |
| 25 class SyncerThread; | |
| 26 struct AuthWatcherEvent; | 23 struct AuthWatcherEvent; |
| 27 struct ServerConnectionEvent; | 24 struct ServerConnectionEvent; |
| 28 | 25 |
| 29 class AllStatus : public SyncEngineEventListener { | 26 class AllStatus : public SyncEngineEventListener { |
| 30 friend class ScopedStatusLock; | 27 friend class ScopedStatusLock; |
| 31 public: | 28 public: |
| 32 | |
| 33 AllStatus(); | 29 AllStatus(); |
| 34 virtual ~AllStatus(); | 30 virtual ~AllStatus(); |
| 35 | 31 |
| 36 void HandleServerConnectionEvent(const ServerConnectionEvent& event); | 32 void HandleServerConnectionEvent(const ServerConnectionEvent& event); |
| 37 | 33 |
| 38 void HandleAuthWatcherEvent(const AuthWatcherEvent& event); | 34 void HandleAuthWatcherEvent(const AuthWatcherEvent& event); |
| 39 | 35 |
| 40 virtual void OnSyncEngineEvent(const SyncEngineEvent& event); | 36 virtual void OnSyncEngineEvent(const SyncEngineEvent& event); |
| 41 | 37 |
| 42 sync_api::SyncManager::Status status() const; | 38 sync_api::SyncManager::Status status() const; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 70 public: | 66 public: |
| 71 explicit ScopedStatusLock(AllStatus* allstatus); | 67 explicit ScopedStatusLock(AllStatus* allstatus); |
| 72 ~ScopedStatusLock(); | 68 ~ScopedStatusLock(); |
| 73 protected: | 69 protected: |
| 74 AllStatus* allstatus_; | 70 AllStatus* allstatus_; |
| 75 }; | 71 }; |
| 76 | 72 |
| 77 } // namespace browser_sync | 73 } // namespace browser_sync |
| 78 | 74 |
| 79 #endif // CHROME_BROWSER_SYNC_ENGINE_ALL_STATUS_H_ | 75 #endif // CHROME_BROWSER_SYNC_ENGINE_ALL_STATUS_H_ |
| OLD | NEW |