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

Side by Side Diff: chrome/browser/sync/internal_api/sync_manager.h

Issue 8586014: [Sync] Replace uses of ObserverListThreadSafe with WeakHandles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_ 5 #ifndef CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_
6 #define CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_ 6 #define CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 // Switches the mode of operation to CONFIGURATION_MODE and 486 // Switches the mode of operation to CONFIGURATION_MODE and
487 // schedules a config task to fetch updates for |types|. 487 // schedules a config task to fetch updates for |types|.
488 void RequestConfig(const syncable::ModelTypeBitSet& types, 488 void RequestConfig(const syncable::ModelTypeBitSet& types,
489 sync_api::ConfigureReason reason); 489 sync_api::ConfigureReason reason);
490 490
491 void RequestCleanupDisabledTypes(); 491 void RequestCleanupDisabledTypes();
492 492
493 // Request a clearing of all data on the server 493 // Request a clearing of all data on the server
494 void RequestClearServerData(); 494 void RequestClearServerData();
495 495
496 // Add/remove change observers.
497 void AddChangeObserver(ChangeObserver* observer);
498 void RemoveChangeObserver(ChangeObserver* observer);
499
500 // Adds a listener to be notified of sync events. 496 // Adds a listener to be notified of sync events.
501 // NOTE: It is OK (in fact, it's probably a good idea) to call this before 497 // NOTE: It is OK (in fact, it's probably a good idea) to call this before
502 // having received OnInitializationCompleted. 498 // having received OnInitializationCompleted.
503 void AddObserver(Observer* observer); 499 void AddObserver(Observer* observer);
504 500
505 // Remove the given observer. Make sure to call this if the 501 // Remove the given observer. Make sure to call this if the
506 // Observer is being destroyed so the SyncManager doesn't 502 // Observer is being destroyed so the SyncManager doesn't
507 // potentially dereference garbage. 503 // potentially dereference garbage.
508 void RemoveObserver(Observer* observer); 504 void RemoveObserver(Observer* observer);
509 505
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 syncable::ModelTypeSet GetTypesWithEmptyProgressMarkerToken( 594 syncable::ModelTypeSet GetTypesWithEmptyProgressMarkerToken(
599 const syncable::ModelTypeSet types, 595 const syncable::ModelTypeSet types,
600 sync_api::UserShare* share); 596 sync_api::UserShare* share);
601 597
602 // Returns the string representation of a PassphraseRequiredReason value. 598 // Returns the string representation of a PassphraseRequiredReason value.
603 std::string PassphraseRequiredReasonToString(PassphraseRequiredReason reason); 599 std::string PassphraseRequiredReasonToString(PassphraseRequiredReason reason);
604 600
605 } // namespace sync_api 601 } // namespace sync_api
606 602
607 #endif // CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_ 603 #endif // CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698