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

Unified Diff: chrome/browser/sync/notifier/server_notifier_thread.h

Issue 2817037: Refactored ChromeInvalidationClient to have its own listener type. (Closed)
Patch Set: Addressed nick's comments 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
Index: chrome/browser/sync/notifier/server_notifier_thread.h
diff --git a/chrome/browser/sync/notifier/server_notifier_thread.h b/chrome/browser/sync/notifier/server_notifier_thread.h
index 021095c26911bf1c817cdb899369d95787c72b45..97f599062c41e6fdbf0716c1ff5b782b8b75dd59 100644
--- a/chrome/browser/sync/notifier/server_notifier_thread.h
+++ b/chrome/browser/sync/notifier/server_notifier_thread.h
@@ -16,17 +16,15 @@
#include <vector>
#include "base/scoped_ptr.h"
-#include "base/task.h"
+#include "chrome/browser/sync/notifier/chrome_invalidation_client.h"
+#include "chrome/browser/sync/syncable/model_type.h"
#include "chrome/common/net/notifier/listener/mediator_thread_impl.h"
-#include "google/cacheinvalidation/invalidation-client.h"
namespace sync_notifier {
-class ChromeInvalidationClient;
-
class ServerNotifierThread
: public notifier::MediatorThreadImpl,
- public invalidation::InvalidationListener {
+ public ChromeInvalidationClient::Listener {
public:
ServerNotifierThread();
@@ -47,17 +45,11 @@ class ServerNotifierThread
// Must not be called.
virtual void SendNotification(const OutgoingNotificationData& data);
- // invalidation::InvalidationListener implementation.
-
- virtual void Invalidate(const invalidation::Invalidation& invalidation,
- invalidation::Closure* callback);
-
- virtual void InvalidateAll(invalidation::Closure* callback);
+ // ChromeInvalidationClient::Listener implementation.
- virtual void AllRegistrationsLost(invalidation::Closure* callback);
+ virtual void OnInvalidate(syncable::ModelType model_type);
- virtual void RegistrationLost(const invalidation::ObjectId& object_id,
- invalidation::Closure* callback);
+ virtual void OnInvalidateAll();
private:
// Posted to the worker thread by ListenForUpdates().
@@ -66,14 +58,6 @@ class ServerNotifierThread
// Posted to the worker thread by SubscribeForUpdates().
void RegisterTypesAndSignalSubscribed();
- // Register the sync types that we're interested in getting
- // notifications for.
- void RegisterTypes();
-
- // Called when we get a registration response back.
- void RegisterCallback(
- const invalidation::RegistrationUpdateResult& result);
-
// Signal to the delegate that we're subscribed.
void SignalSubscribed();
« no previous file with comments | « chrome/browser/sync/notifier/chrome_invalidation_client.cc ('k') | chrome/browser/sync/notifier/server_notifier_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698