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

Side by Side Diff: sync/notifier/push_client_channel.h

Issue 116533006: Control invalidations network channel from TiclInvalidationService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 SYNC_NOTIFIER_PUSH_CLIENT_CHANNEL_H_ 5 #ifndef SYNC_NOTIFIER_PUSH_CLIENT_CHANNEL_H_
6 #define SYNC_NOTIFIER_PUSH_CLIENT_CHANNEL_H_ 6 #define SYNC_NOTIFIER_PUSH_CLIENT_CHANNEL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 17 matching lines...) Expand all
28 public: 28 public:
29 // |push_client| is guaranteed to be destroyed only when this object 29 // |push_client| is guaranteed to be destroyed only when this object
30 // is destroyed. 30 // is destroyed.
31 explicit PushClientChannel(scoped_ptr<notifier::PushClient> push_client); 31 explicit PushClientChannel(scoped_ptr<notifier::PushClient> push_client);
32 32
33 virtual ~PushClientChannel(); 33 virtual ~PushClientChannel();
34 34
35 // If not connected, connects with the given credentials. If 35 // If not connected, connects with the given credentials. If
36 // already connected, the next connection attempt will use the given 36 // already connected, the next connection attempt will use the given
37 // credentials. 37 // credentials.
38 void UpdateCredentials(const std::string& email, const std::string& token); 38 virtual void UpdateCredentials(const std::string& email,
39 const std::string& token) OVERRIDE;
39 40
40 // SyncNetworkChannel implementation. 41 // SyncNetworkChannel implementation.
41 virtual void SendEncodedMessage(const std::string& encoded_message) OVERRIDE; 42 virtual void SendEncodedMessage(const std::string& encoded_message) OVERRIDE;
42 43
43 // notifier::PushClient::Observer implementation. 44 // notifier::PushClient::Observer implementation.
44 virtual void OnNotificationsEnabled() OVERRIDE; 45 virtual void OnNotificationsEnabled() OVERRIDE;
45 virtual void OnNotificationsDisabled( 46 virtual void OnNotificationsDisabled(
46 notifier::NotificationsDisabledReason reason) OVERRIDE; 47 notifier::NotificationsDisabledReason reason) OVERRIDE;
47 virtual void OnIncomingNotification( 48 virtual void OnIncomingNotification(
48 const notifier::Notification& notification) OVERRIDE; 49 const notifier::Notification& notification) OVERRIDE;
49 50
50 private: 51 private:
51 scoped_ptr<notifier::PushClient> push_client_; 52 scoped_ptr<notifier::PushClient> push_client_;
52 53
53 DISALLOW_COPY_AND_ASSIGN(PushClientChannel); 54 DISALLOW_COPY_AND_ASSIGN(PushClientChannel);
54 }; 55 };
55 56
56 } // namespace syncer 57 } // namespace syncer
57 58
58 #endif // SYNC_NOTIFIER_PUSH_CLIENT_CHANNEL_H_ 59 #endif // SYNC_NOTIFIER_PUSH_CLIENT_CHANNEL_H_
OLDNEW
« no previous file with comments | « sync/notifier/non_blocking_invalidator_unittest.cc ('k') | sync/notifier/push_client_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698