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 #ifndef CHROME_BROWSER_SYNC_INTERNAL_API_DEBUG_INFO_EVENT_LISTENER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_INTERNAL_API_DEBUG_INFO_EVENT_LISTENER_H_ |
6 #define CHROME_BROWSER_SYNC_INTERNAL_API_DEBUG_INFO_EVENT_LISTENER_H_ | 6 #define CHROME_BROWSER_SYNC_INTERNAL_API_DEBUG_INFO_EVENT_LISTENER_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "chrome/browser/sync/internal_api/sync_manager.h" | 12 #include "chrome/browser/sync/internal_api/sync_manager.h" |
13 #include "chrome/browser/sync/js/js_backend.h" | 13 #include "sync/js/js_backend.h" |
14 #include "chrome/browser/sync/sessions/debug_info_getter.h" | |
15 #include "chrome/browser/sync/sessions/session_state.h" | |
16 #include "chrome/browser/sync/util/weak_handle.h" | |
17 #include "sync/protocol/sync.pb.h" | 14 #include "sync/protocol/sync.pb.h" |
| 15 #include "sync/sessions/debug_info_getter.h" |
| 16 #include "sync/sessions/session_state.h" |
| 17 #include "sync/util/weak_handle.h" |
18 | 18 |
19 namespace sync_api { | 19 namespace sync_api { |
20 | 20 |
21 const unsigned int kMaxEntries = 6; | 21 const unsigned int kMaxEntries = 6; |
22 | 22 |
23 // Listens to events and records them in a queue. And passes the events to | 23 // Listens to events and records them in a queue. And passes the events to |
24 // syncer when requested. | 24 // syncer when requested. |
25 class DebugInfoEventListener : public sync_api::SyncManager::Observer, | 25 class DebugInfoEventListener : public sync_api::SyncManager::Observer, |
26 public browser_sync::sessions::DebugInfoGetter { | 26 public browser_sync::sessions::DebugInfoGetter { |
27 public: | 27 public: |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 // True indicates we had to drop one or more events to keep our limit of | 68 // True indicates we had to drop one or more events to keep our limit of |
69 // |kMaxEntries|. | 69 // |kMaxEntries|. |
70 bool events_dropped_; | 70 bool events_dropped_; |
71 | 71 |
72 DISALLOW_COPY_AND_ASSIGN(DebugInfoEventListener); | 72 DISALLOW_COPY_AND_ASSIGN(DebugInfoEventListener); |
73 }; | 73 }; |
74 | 74 |
75 } // namespace sync_api | 75 } // namespace sync_api |
76 #endif // CHROME_BROWSER_SYNC_INTERNAL_API_DEBUG_INFO_EVENT_LISTENER_H_ | 76 #endif // CHROME_BROWSER_SYNC_INTERNAL_API_DEBUG_INFO_EVENT_LISTENER_H_ |
OLD | NEW |