OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // A simple wrapper around invalidation::InvalidationClient that | 5 // A simple wrapper around invalidation::InvalidationClient that |
6 // handles all the startup/shutdown details and hookups. | 6 // handles all the startup/shutdown details and hookups. |
7 | 7 |
8 #ifndef CHROME_BROWSER_SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_ | 8 #ifndef CHROME_BROWSER_SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_ |
9 #define CHROME_BROWSER_SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_ | 9 #define CHROME_BROWSER_SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_ |
10 #pragma once | 10 #pragma once |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 }; | 47 }; |
48 | 48 |
49 ChromeInvalidationClient(); | 49 ChromeInvalidationClient(); |
50 | 50 |
51 // Calls Stop(). | 51 // Calls Stop(). |
52 virtual ~ChromeInvalidationClient(); | 52 virtual ~ChromeInvalidationClient(); |
53 | 53 |
54 // Does not take ownership of |listener| or |state_writer|. | 54 // Does not take ownership of |listener| or |state_writer|. |
55 // |base_task| must still be non-NULL. | 55 // |base_task| must still be non-NULL. |
56 void Start( | 56 void Start( |
57 const std::string& client_id, const std::string& state, | 57 const std::string& client_id, const std::string& client_info, |
58 Listener* listener, StateWriter* state_writer, | 58 const std::string& state, Listener* listener, |
59 base::WeakPtr<talk_base::Task> base_task); | 59 StateWriter* state_writer, base::WeakPtr<talk_base::Task> base_task); |
60 | 60 |
61 void Stop(); | 61 void Stop(); |
62 | 62 |
63 // Changes the task used to |base_task|, which must still be | 63 // Changes the task used to |base_task|, which must still be |
64 // non-NULL. Must only be called between calls to Start() and | 64 // non-NULL. Must only be called between calls to Start() and |
65 // Stop(). | 65 // Stop(). |
66 void ChangeBaseTask(base::WeakPtr<talk_base::Task> base_task); | 66 void ChangeBaseTask(base::WeakPtr<talk_base::Task> base_task); |
67 | 67 |
68 // Register the sync types that we're interested in getting | 68 // Register the sync types that we're interested in getting |
69 // notifications for. Must only be called between calls to Start() | 69 // notifications for. Must only be called between calls to Start() |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 scoped_ptr<CacheInvalidationPacketHandler> | 110 scoped_ptr<CacheInvalidationPacketHandler> |
111 cache_invalidation_packet_handler_; | 111 cache_invalidation_packet_handler_; |
112 scoped_ptr<RegistrationManager> registration_manager_; | 112 scoped_ptr<RegistrationManager> registration_manager_; |
113 | 113 |
114 DISALLOW_COPY_AND_ASSIGN(ChromeInvalidationClient); | 114 DISALLOW_COPY_AND_ASSIGN(ChromeInvalidationClient); |
115 }; | 115 }; |
116 | 116 |
117 } // namespace sync_notifier | 117 } // namespace sync_notifier |
118 | 118 |
119 #endif // CHROME_BROWSER_SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_ | 119 #endif // CHROME_BROWSER_SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_ |
OLD | NEW |