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

Side by Side Diff: sync/internal_api/sync_manager_impl.h

Issue 10823061: Revert 148792 - [Sync] Remove CleanupDisabledTypes command and move purge logic into SyncManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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/engine/syncer.cc ('k') | sync/internal_api/sync_manager_impl.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 #ifndef SYNC_INTERNAL_API_SYNC_MANAGER_H_ 5 #ifndef SYNC_INTERNAL_API_SYNC_MANAGER_H_
6 #define SYNC_INTERNAL_API_SYNC_MANAGER_H_ 6 #define SYNC_INTERNAL_API_SYNC_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 // Called only by our NetworkChangeNotifier. 173 // Called only by our NetworkChangeNotifier.
174 virtual void OnIPAddressChanged() OVERRIDE; 174 virtual void OnIPAddressChanged() OVERRIDE;
175 175
176 const SyncScheduler* scheduler() const; 176 const SyncScheduler* scheduler() const;
177 177
178 private: 178 private:
179 friend class SyncManagerTest; 179 friend class SyncManagerTest;
180 FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, NudgeDelayTest); 180 FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, NudgeDelayTest);
181 FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, OnNotificationStateChange); 181 FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, OnNotificationStateChange);
182 FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, OnIncomingNotification); 182 FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, OnIncomingNotification);
183 FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, PurgeDisabledTypes);
184 183
185 struct NotificationInfo { 184 struct NotificationInfo {
186 NotificationInfo(); 185 NotificationInfo();
187 ~NotificationInfo(); 186 ~NotificationInfo();
188 187
189 int total_count; 188 int total_count;
190 std::string payload; 189 std::string payload;
191 190
192 // Returned pointer owned by the caller. 191 // Returned pointer owned by the caller.
193 DictionaryValue* ToValue() const; 192 DictionaryValue* ToValue() const;
(...skipping 27 matching lines...) Expand all
221 220
222 // Open the directory named with username_for_share 221 // Open the directory named with username_for_share
223 bool OpenDirectory(); 222 bool OpenDirectory();
224 223
225 // Sign into sync with given credentials. 224 // Sign into sync with given credentials.
226 // We do not verify the tokens given. After this call, the tokens are set 225 // We do not verify the tokens given. After this call, the tokens are set
227 // and the sync DB is open. True if successful, false if something 226 // and the sync DB is open. True if successful, false if something
228 // went wrong. 227 // went wrong.
229 bool SignIn(const SyncCredentials& credentials); 228 bool SignIn(const SyncCredentials& credentials);
230 229
231 // Purge those types from |previously_enabled_types| that are no longer
232 // enabled in |currently_enabled_types|.
233 bool PurgeDisabledTypes(ModelTypeSet previously_enabled_types,
234 ModelTypeSet currently_enabled_types);
235
236 void RequestNudgeForDataTypes( 230 void RequestNudgeForDataTypes(
237 const tracked_objects::Location& nudge_location, 231 const tracked_objects::Location& nudge_location,
238 ModelTypeSet type); 232 ModelTypeSet type);
239 233
240 void NotifyCryptographerState(Cryptographer* cryptographer); 234 void NotifyCryptographerState(Cryptographer* cryptographer);
241 235
242 // If this is a deletion for a password, sets the legacy 236 // If this is a deletion for a password, sets the legacy
243 // ExtraPasswordChangeRecordData field of |buffer|. Otherwise sets 237 // ExtraPasswordChangeRecordData field of |buffer|. Otherwise sets
244 // |buffer|'s specifics field to contain the unencrypted data. 238 // |buffer|'s specifics field to contain the unencrypted data.
245 void SetExtraChangeRecordData(int64 id, 239 void SetExtraChangeRecordData(int64 id,
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 // conflict resolver) updated the nigori's encryption keys in this chrome 401 // conflict resolver) updated the nigori's encryption keys in this chrome
408 // instantiation. 402 // instantiation.
409 int nigori_overwrite_count_; 403 int nigori_overwrite_count_;
410 404
411 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); 405 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl);
412 }; 406 };
413 407
414 } // namespace syncer 408 } // namespace syncer
415 409
416 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ 410 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_
OLDNEW
« no previous file with comments | « sync/engine/syncer.cc ('k') | sync/internal_api/sync_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698