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

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: include order 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
« no previous file with comments | « sync/internal_api/syncapi_unittest.cc ('k') | sync/notifier/chrome_invalidation_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 virtual ~ChromeInvalidationClient(); 61 virtual ~ChromeInvalidationClient();
62 62
63 // Does not take ownership of |listener| or |state_writer|. 63 // Does not take ownership of |listener| or |state_writer|.
64 // |invalidation_state_tracker| must be initialized. 64 // |invalidation_state_tracker| must be initialized.
65 void Start( 65 void Start(
66 const std::string& client_id, const std::string& client_info, 66 const std::string& client_id, const std::string& client_info,
67 const std::string& state, 67 const std::string& state,
68 const InvalidationVersionMap& initial_max_invalidation_versions, 68 const InvalidationVersionMap& initial_max_invalidation_versions,
69 const browser_sync::WeakHandle<InvalidationStateTracker>& 69 const browser_sync::WeakHandle<InvalidationStateTracker>&
70 invalidation_state_tracker, 70 invalidation_state_tracker,
71 Listener* listener, 71 Listener* listener);
72 StateWriter* state_writer);
73 72
74 void UpdateCredentials(const std::string& email, const std::string& token); 73 void UpdateCredentials(const std::string& email, const std::string& token);
75 74
76 // Register the sync types that we're interested in getting 75 // Register the sync types that we're interested in getting
77 // notifications for. May be called at any time. 76 // notifications for. May be called at any time.
78 void RegisterTypes(syncable::ModelTypeSet types); 77 void RegisterTypes(syncable::ModelTypeSet types);
79 78
80 virtual void WriteState(const std::string& state) OVERRIDE; 79 virtual void WriteState(const std::string& state) OVERRIDE;
81 80
82 // invalidation::InvalidationListener implementation. 81 // invalidation::InvalidationListener implementation.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 116
118 void EmitInvalidation( 117 void EmitInvalidation(
119 syncable::ModelTypeSet types, const std::string& payload); 118 syncable::ModelTypeSet types, const std::string& payload);
120 119
121 base::NonThreadSafe non_thread_safe_; 120 base::NonThreadSafe non_thread_safe_;
122 ChromeSystemResources chrome_system_resources_; 121 ChromeSystemResources chrome_system_resources_;
123 InvalidationVersionMap max_invalidation_versions_; 122 InvalidationVersionMap max_invalidation_versions_;
124 browser_sync::WeakHandle<InvalidationStateTracker> 123 browser_sync::WeakHandle<InvalidationStateTracker>
125 invalidation_state_tracker_; 124 invalidation_state_tracker_;
126 Listener* listener_; 125 Listener* listener_;
127 StateWriter* state_writer_;
128 scoped_ptr<invalidation::InvalidationClient> invalidation_client_; 126 scoped_ptr<invalidation::InvalidationClient> invalidation_client_;
129 scoped_ptr<RegistrationManager> registration_manager_; 127 scoped_ptr<RegistrationManager> registration_manager_;
130 // Stored to pass to |registration_manager_| on start. 128 // Stored to pass to |registration_manager_| on start.
131 syncable::ModelTypeSet registered_types_; 129 syncable::ModelTypeSet registered_types_;
132 bool ticl_ready_; 130 bool ticl_ready_;
133 131
134 DISALLOW_COPY_AND_ASSIGN(ChromeInvalidationClient); 132 DISALLOW_COPY_AND_ASSIGN(ChromeInvalidationClient);
135 }; 133 };
136 134
137 } // namespace sync_notifier 135 } // namespace sync_notifier
138 136
139 #endif // SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_ 137 #endif // SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_
OLDNEW
« no previous file with comments | « sync/internal_api/syncapi_unittest.cc ('k') | sync/notifier/chrome_invalidation_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698