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

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

Issue 10451060: sync: migrate invalidation state from syncable::Directory to InvalidationStorage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: init Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 // 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 SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_ 8 #ifndef SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_
9 #define SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_ 9 #define SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_
10 #pragma once 10 #pragma once
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // Does not take ownership of |listener| or |state_writer|. 59 // Does not take ownership of |listener| or |state_writer|.
60 // |invalidation_state_tracker| must be initialized. 60 // |invalidation_state_tracker| must be initialized.
61 // |base_task| must still be non-NULL. 61 // |base_task| must still be non-NULL.
62 void Start( 62 void Start(
63 const std::string& client_id, const std::string& client_info, 63 const std::string& client_id, const std::string& client_info,
64 const std::string& state, 64 const std::string& state,
65 const InvalidationVersionMap& initial_max_invalidation_versions, 65 const InvalidationVersionMap& initial_max_invalidation_versions,
66 const browser_sync::WeakHandle<InvalidationStateTracker>& 66 const browser_sync::WeakHandle<InvalidationStateTracker>&
67 invalidation_state_tracker, 67 invalidation_state_tracker,
68 Listener* listener, 68 Listener* listener,
69 StateWriter* state_writer,
70 base::WeakPtr<buzz::XmppTaskParentInterface> base_task); 69 base::WeakPtr<buzz::XmppTaskParentInterface> base_task);
71 70
72 void Stop(); 71 void Stop();
73 72
74 // Changes the task used to |base_task|, which must still be 73 // Changes the task used to |base_task|, which must still be
75 // non-NULL. Must only be called between calls to Start() and 74 // non-NULL. Must only be called between calls to Start() and
76 // Stop(). 75 // Stop().
77 void ChangeBaseTask(base::WeakPtr<buzz::XmppTaskParentInterface> base_task); 76 void ChangeBaseTask(base::WeakPtr<buzz::XmppTaskParentInterface> base_task);
78 77
79 // Register the sync types that we're interested in getting 78 // Register the sync types that we're interested in getting
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 117
119 void EmitInvalidation( 118 void EmitInvalidation(
120 syncable::ModelTypeSet types, const std::string& payload); 119 syncable::ModelTypeSet types, const std::string& payload);
121 120
122 base::NonThreadSafe non_thread_safe_; 121 base::NonThreadSafe non_thread_safe_;
123 ChromeSystemResources chrome_system_resources_; 122 ChromeSystemResources chrome_system_resources_;
124 InvalidationVersionMap max_invalidation_versions_; 123 InvalidationVersionMap max_invalidation_versions_;
125 browser_sync::WeakHandle<InvalidationStateTracker> 124 browser_sync::WeakHandle<InvalidationStateTracker>
126 invalidation_state_tracker_; 125 invalidation_state_tracker_;
127 Listener* listener_; 126 Listener* listener_;
128 StateWriter* state_writer_;
129 scoped_ptr<invalidation::InvalidationClient> invalidation_client_; 127 scoped_ptr<invalidation::InvalidationClient> invalidation_client_;
130 scoped_ptr<CacheInvalidationPacketHandler> 128 scoped_ptr<CacheInvalidationPacketHandler>
131 cache_invalidation_packet_handler_; 129 cache_invalidation_packet_handler_;
132 scoped_ptr<RegistrationManager> registration_manager_; 130 scoped_ptr<RegistrationManager> registration_manager_;
133 // Stored to pass to |registration_manager_| on start. 131 // Stored to pass to |registration_manager_| on start.
134 syncable::ModelTypeSet registered_types_; 132 syncable::ModelTypeSet registered_types_;
135 bool ticl_ready_; 133 bool ticl_ready_;
136 134
137 DISALLOW_COPY_AND_ASSIGN(ChromeInvalidationClient); 135 DISALLOW_COPY_AND_ASSIGN(ChromeInvalidationClient);
138 }; 136 };
139 137
140 } // namespace sync_notifier 138 } // namespace sync_notifier
141 139
142 #endif // SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_ 140 #endif // SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698