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

Unified Diff: sync/notifier/chrome_system_resources.h

Issue 10436013: [Sync] Make InvalidationNotifier use PushClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync to head Created 8 years, 7 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 | « sync/notifier/chrome_invalidation_client_unittest.cc ('k') | sync/notifier/chrome_system_resources.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/notifier/chrome_system_resources.h
diff --git a/sync/notifier/chrome_system_resources.h b/sync/notifier/chrome_system_resources.h
index 032e050af7d35a5e05fdc78dea4ed1bf23b879b2..852b56c27b5110fdcfb2312eb035c61bee8e558c 100644
--- a/sync/notifier/chrome_system_resources.h
+++ b/sync/notifier/chrome_system_resources.h
@@ -20,11 +20,14 @@
#include "base/message_loop.h"
#include "base/threading/non_thread_safe.h"
#include "google/cacheinvalidation/include/system-resources.h"
+#include "sync/notifier/push_client_channel.h"
#include "sync/notifier/state_writer.h"
-namespace sync_notifier {
+namespace notifier {
+class PushClient;
+} // namespace notifier
-class CacheInvalidationPacketHandler;
+namespace sync_notifier {
class ChromeLogger : public invalidation::Logger {
public:
@@ -114,38 +117,10 @@ class ChromeStorage : public invalidation::Storage {
std::string cached_state_;
};
-class ChromeNetwork : public invalidation::NetworkChannel {
- public:
- ChromeNetwork();
-
- virtual ~ChromeNetwork();
-
- void UpdatePacketHandler(CacheInvalidationPacketHandler* packet_handler);
-
- // invalidation::NetworkChannel implementation.
- virtual void SendMessage(const std::string& outgoing_message) OVERRIDE;
-
- virtual void SetMessageReceiver(
- invalidation::MessageCallback* incoming_receiver) OVERRIDE;
-
- virtual void AddNetworkStatusReceiver(
- invalidation::NetworkStatusCallback* network_status_receiver) OVERRIDE;
-
- virtual void SetSystemResources(
- invalidation::SystemResources* resources) OVERRIDE;
-
- private:
- void HandleInboundMessage(const std::string& incoming_message);
-
- CacheInvalidationPacketHandler* packet_handler_;
- scoped_ptr<invalidation::MessageCallback> incoming_receiver_;
- std::vector<invalidation::NetworkStatusCallback*> network_status_receivers_;
- base::WeakPtrFactory<ChromeNetwork> weak_factory_;
-};
-
class ChromeSystemResources : public invalidation::SystemResources {
public:
- explicit ChromeSystemResources(StateWriter* state_writer);
+ ChromeSystemResources(scoped_ptr<notifier::PushClient> push_client,
+ StateWriter* state_writer);
virtual ~ChromeSystemResources();
@@ -157,7 +132,7 @@ class ChromeSystemResources : public invalidation::SystemResources {
virtual std::string platform() const OVERRIDE;
virtual ChromeLogger* logger() OVERRIDE;
virtual ChromeStorage* storage() OVERRIDE;
- virtual ChromeNetwork* network() OVERRIDE;
+ virtual PushClientChannel* network() OVERRIDE;
virtual ChromeScheduler* internal_scheduler() OVERRIDE;
virtual ChromeScheduler* listener_scheduler() OVERRIDE;
@@ -168,7 +143,7 @@ class ChromeSystemResources : public invalidation::SystemResources {
scoped_ptr<ChromeScheduler> internal_scheduler_;
scoped_ptr<ChromeScheduler> listener_scheduler_;
scoped_ptr<ChromeStorage> storage_;
- scoped_ptr<ChromeNetwork> network_;
+ PushClientChannel push_client_channel_;
};
} // namespace sync_notifier
« no previous file with comments | « sync/notifier/chrome_invalidation_client_unittest.cc ('k') | sync/notifier/chrome_system_resources.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698