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

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

Issue 8772074: [Sync] Convert syncable/ directory to ModelEnumSet (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typo Created 9 years 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 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 bool InitialSyncEndedForAllEnabledTypes(); 450 bool InitialSyncEndedForAllEnabledTypes();
451 451
452 // Update tokens that we're using in Sync. Email must stay the same. 452 // Update tokens that we're using in Sync. Email must stay the same.
453 void UpdateCredentials(const SyncCredentials& credentials); 453 void UpdateCredentials(const SyncCredentials& credentials);
454 454
455 // Called when the user disables or enables a sync type. 455 // Called when the user disables or enables a sync type.
456 void UpdateEnabledTypes(); 456 void UpdateEnabledTypes();
457 457
458 // Conditionally sets the flag in the Nigori node which instructs other 458 // Conditionally sets the flag in the Nigori node which instructs other
459 // clients to start syncing tabs. 459 // clients to start syncing tabs.
460 void MaybeSetSyncTabsInNigoriNode(const syncable::ModelTypeSet enabled_types); 460 void MaybeSetSyncTabsInNigoriNode(syncable::ModelEnumSet enabled_types);
461 461
462 // Put the syncer in normal mode ready to perform nudges and polls. 462 // Put the syncer in normal mode ready to perform nudges and polls.
463 void StartSyncingNormally(); 463 void StartSyncingNormally();
464 464
465 // Attempt to set the passphrase. If the passphrase is valid, 465 // Attempt to set the passphrase. If the passphrase is valid,
466 // OnPassphraseAccepted will be fired to notify the ProfileSyncService and the 466 // OnPassphraseAccepted will be fired to notify the ProfileSyncService and the
467 // syncer will be nudged so that any update that was waiting for this 467 // syncer will be nudged so that any update that was waiting for this
468 // passphrase gets applied as soon as possible. 468 // passphrase gets applied as soon as possible.
469 // If the passphrase in invalid, OnPassphraseRequired will be fired. 469 // If the passphrase in invalid, OnPassphraseRequired will be fired.
470 // Calling this metdod again is the appropriate course of action to "retry" 470 // Calling this metdod again is the appropriate course of action to "retry"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 // Uses a read-only transaction to determine if the directory being synced has 569 // Uses a read-only transaction to determine if the directory being synced has
570 // any remaining unsynced items. May be called on any thread. 570 // any remaining unsynced items. May be called on any thread.
571 bool HasUnsyncedItems() const; 571 bool HasUnsyncedItems() const;
572 572
573 // Functions used for testing. 573 // Functions used for testing.
574 574
575 void TriggerOnNotificationStateChangeForTest( 575 void TriggerOnNotificationStateChangeForTest(
576 bool notifications_enabled); 576 bool notifications_enabled);
577 577
578 void TriggerOnIncomingNotificationForTest( 578 void TriggerOnIncomingNotificationForTest(
579 const syncable::ModelTypeBitSet& model_types); 579 syncable::ModelEnumSet model_types);
580 580
581 private: 581 private:
582 base::ThreadChecker thread_checker_; 582 base::ThreadChecker thread_checker_;
583 583
584 // An opaque pointer to the nested private class. 584 // An opaque pointer to the nested private class.
585 SyncInternal* data_; 585 SyncInternal* data_;
586 586
587 DISALLOW_COPY_AND_ASSIGN(SyncManager); 587 DISALLOW_COPY_AND_ASSIGN(SyncManager);
588 }; 588 };
589 589
590 bool InitialSyncEndedForTypes(syncable::ModelTypeSet types, UserShare* share); 590 bool InitialSyncEndedForTypes(syncable::ModelTypeSet types, UserShare* share);
591 591
592 syncable::ModelTypeSet GetTypesWithEmptyProgressMarkerToken( 592 syncable::ModelTypeSet GetTypesWithEmptyProgressMarkerToken(
593 const syncable::ModelTypeSet types, 593 const syncable::ModelTypeSet types,
594 sync_api::UserShare* share); 594 sync_api::UserShare* share);
595 595
596 // Returns the string representation of a PassphraseRequiredReason value. 596 // Returns the string representation of a PassphraseRequiredReason value.
597 std::string PassphraseRequiredReasonToString(PassphraseRequiredReason reason); 597 std::string PassphraseRequiredReasonToString(PassphraseRequiredReason reason);
598 598
599 } // namespace sync_api 599 } // namespace sync_api
600 600
601 #endif // CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_ 601 #endif // CHROME_BROWSER_SYNC_INTERNAL_API_SYNC_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/engine/syncer_unittest.cc ('k') | chrome/browser/sync/internal_api/sync_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698