Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(552)

Unified Diff: chrome/browser/sync/engine/all_status.h

Issue 2075012: Replace changes_channel with an observer list. (Closed)
Patch Set: Ready for checkin Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/sync/engine/all_status.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/engine/all_status.h
diff --git a/chrome/browser/sync/engine/all_status.h b/chrome/browser/sync/engine/all_status.h
index d34a15a8f4d0d6d1eb4506721250bfde1717b6cc..63edd1780558885371221639ca5a47374c2b7087 100644
--- a/chrome/browser/sync/engine/all_status.h
+++ b/chrome/browser/sync/engine/all_status.h
@@ -13,6 +13,7 @@
#include "base/atomicops.h"
#include "base/lock.h"
#include "base/scoped_ptr.h"
+#include "chrome/browser/sync/util/channel.h"
#include "chrome/common/deprecated/event_sys.h"
namespace browser_sync {
@@ -26,7 +27,7 @@ struct AuthWatcherEvent;
struct ServerConnectionEvent;
struct SyncerEvent;
-class AllStatus {
+class AllStatus : public ChannelEventHandler<SyncerEvent> {
friend class ScopedStatusLockWithNotify;
public:
typedef EventChannel<AllStatusEvent, Lock> Channel;
@@ -97,7 +98,7 @@ class AllStatus {
void HandleAuthWatcherEvent(const AuthWatcherEvent& event);
void WatchSyncerThread(SyncerThread* syncer_thread);
- void HandleSyncerEvent(const SyncerEvent& event);
+ void HandleChannelEvent(const SyncerEvent& event);
// Returns a string description of the SyncStatus (currently just the ascii
// version of the enum). Will LOG(FATAL) if the status us out of range.
@@ -134,7 +135,7 @@ class AllStatus {
Status status_;
Channel* const channel_;
scoped_ptr<EventListenerHookup> conn_mgr_hookup_;
- scoped_ptr<EventListenerHookup> syncer_thread_hookup_;
+ scoped_ptr<ChannelHookup<SyncerEvent> > syncer_thread_hookup_;
scoped_ptr<EventListenerHookup> diskfull_hookup_;
scoped_ptr<EventListenerHookup> talk_mediator_hookup_;
« no previous file with comments | « no previous file | chrome/browser/sync/engine/all_status.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698