summaryrefslogtreecommitdiffstats
path: root/sync/internal_api/js_sync_manager_observer.cc
Commit message (Collapse)AuthorAgeFilesLines
* Remove Sync JS generic request/reply frameworkrlarocque@chromium.org2014-04-101-1/+0
| | | | | | | | | | | | | | | | | | | | | With the conversion of GetAllNodes in r262193, there are no longer any uses of the Sync JS framework's request + reply framework. The generic framework was useful when we could guarantee that the requests would be handled in order, in the SyncManager, and on the sync thread, but new requirements have forced us to re-implement much of this functionality in other ways. Since no one uses this code, and no one plans to use this code, and it depends on some semi-deprecated concepts (WeakHandle), the best course of action seems to be to delete it. We can always fetch it from SVN history and clean it up if we find another use for it. BUG=328606,357821 Review URL: https://codereview.chromium.org/231013003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263105 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Expose ProtocolEvents on ProfileSyncServicerlarocque@chromium.org2014-03-211-0/+3
| | | | | | | | | | | | | | | | | Adds code to the sync engine to have it generate protocol events when it contacts the server. These events are then sent through the SyncSession, SyncManager, SyncBackendHostCore, SyncBackendHost, and finally to the ProfileSyncService. Objects on the UI thread can register with the ProfileSyncService as observers of these events, though this CL does not introduce any of these listeners. BUG=349301 Review URL: https://codereview.chromium.org/203463005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258685 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Move migration signal out of snapshotrlarocque@chromium.org2014-02-121-0/+2
| | | | | | | | | | | | | | | | | | | A sync data migration request is signalled by the server during a normal GetUpdates or Commit request. The signal is then forwarded to the UI thread, which actually performs the migration. Traditionally, the signal has been sent through the SyncSessionSnapshot, which is delivered to the UI thread at the end of the current sync cycle. This CL introduces new code to pass the signal through the SyncSession::Delegate and SyncManagerObserverInterfaces. This CL should not change the syncer's behavior. BUG=339984 Review URL: https://codereview.chromium.org/158953004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250849 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Remove dead code related to ClearUserDatarlarocque@chromium.org2014-02-121-7/+0
| | | | | | | | | | | | | | | | | Removes some code left over from the ClearUserData feature. These are mostly functions named 'OnStopSyncingPermanently'. Also renames ProfileSyncService::OnStopSyncingPermanently to StopSyncingPermanently. This makes it easier to distinguish from the now deprecated SyncManagerObserver callback. The new name is more appropriate name since this function is not really a callback or event handler anymore. BUG=342932 Review URL: https://codereview.chromium.org/153643006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250775 0039d316-1c4b-4281-b951-d872f2087c98
* Remove references to GaiaConstants::kSyncService from syncpavely@chromium.org2013-10-251-9/+0
| | | | | | | | | | | | | | | | This CL is followup after https://codereview.chromium.org/22342003/ I've removed references to GaiaConstants::kSyncService from ProfileSyncService unittests, SyncBackendHost and ProfileSyncService.java There are still references in TokenService, TokenService unittests and chrome/browser/chromeos/login/online_attempt.cc. The last one should not block TokenService migration as it doesn't refer TokenService, but I don't understand that code so decided not to change it. Review URL: https://codereview.chromium.org/31213004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230899 0039d316-1c4b-4281-b951-d872f2087c98
* Add base namespace to more values in sync and elsewhere.brettw@chromium.org2013-06-211-5/+5
| | | | | | | | | | This makes sync and net compile with no "using *Value". BUG= Review URL: https://codereview.chromium.org/17034006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207907 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of strings headers in rlz/, sandbox/, skia/, sql/, sync/.avi@chromium.org2013-06-111-1/+1
| | | | | | | | | | BUG=247723 TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/16358024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205458 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Introduce DataTypeDebugListener and add plumbing to the DataTypeManagerzea@chromium.org2012-11-081-0/+1
| | | | | | | | | | | | | | | | The DataTypeDebugListener is an interface that allows glue components to pass sync debug info to the sync debug event listener, which lives in the sync internals on the sync thread. To do this we pass a WeakHandle at initialization time all the way through to the PSS, which then uses it to create the DataTypeManager. Follow up patches will plumb DTC results to the DataTypeDebugListener. BUG=158576 Review URL: https://chromiumcodereview.appspot.com/11365116 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166616 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Merge apply updates and resolve conflictsrlarocque@chromium.org2012-10-261-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The conflict resolution code was executed after the commit for reasons which no longer apply. Because we no longer have to worry about resolving hierarchy conflicts or nigori node conflicts, we have the opportunity to move conflict resolution closer to update application. One advantage of resolving conflicts early is that we no longer require an extra sync cycle to commit any 'local wins' conflict resolutions. This makes SYNC_CYCLE_CONTINUATION sync cycles obsolete. Another advantage is that update application and conflict resolution can be performed without releasing the sync lock, which eliminates several types of races that we used to have to worry about. It's probably more efficient, too. It allows us to guarantee that there are no simple conflicts remaining after the update application step is completed. The effects might not be very noticeable to end users, but it will be nice to remove some of the conflict tracking code. Finally, it removes the last use PerModelSafeGroupState. This will let us delete some unused code and hopefully simplify StatusController. This patch does not pursue these cleanups as agressively as it could. The idea here is to keep the complex logic changes in one small CL, and perform the cleanups in a larger, but simpler, follow-up CL. BUG=147681,11280,156238 Review URL: https://chromiumcodereview.appspot.com/11192071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164286 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Add SyncEncryptionHandlerzea@chromium.org2012-08-161-52/+0
| | | | | | | | | | | | | | | | | | All sync-specific encryption state (types, encrypt everything, explicit passphrase, keys) is now tracked within the new class SyncEncryptionHandler. It's owned by the sync manager, and unifies some of the observer logic we previously had. In addition, it's capable of creating its own transactions, taking us a step closer to have a nigori datatype. In addition, we add a NigoriHandler to abstract the chrome-side of encryption from the sync visible side of encryption. BUG=139848 Review URL: https://chromiumcodereview.appspot.com/10827266 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151833 0039d316-1c4b-4281-b951-d872f2087c98
* Fix leak in JsSyncManagerObserverrlarocque@chromium.org2012-07-301-3/+5
| | | | | | | | | | | This leak was introduced in r148926. BUG=129825,139635 Review URL: https://chromiumcodereview.appspot.com/10821091 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149062 0039d316-1c4b-4281-b951-d872f2087c98
* Make SyncBackendRegistrar aware of loaded datarlarocque@chromium.org2012-07-301-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a parameter to the SyncManager::Initialize() callback to inform the caller which sync data types were successfully loaded from disk. This allows the SyncBackendHost and related classes make better decisions during initialization. If necessary, the SyncBackendHost will send a configure request to the syncer during early initialization asking it to download the nigori node. Now we can guarantee that the node will be available by the type ProfileSyncService::OnBackendInitialized() is called. The SyncBackendHost test expectations had to be amended to account for this test. Most of the changes are related to the fact that our behaviour no longer depends on the SyncPrefs. The ProfileSyncService*Tests were very much affected by this change. Those tests are parameterized with a callback that is used to initialize the sync DB and pretend that it had been loaded from disk. Previously, this callback would be executed later on during initialization, around the time of ProfileSyncService::OnBackendInitialize(). That approach was incompatible with this change, which requires that we have access to the fully initialized database around the time we return from SyncBackendHost::Initialize(). The callback had to be moved, which meant that it now required an explicit UserShare parameter, which meant that a lot of call sites had to be updated. BUG=129825 TEST= Review URL: https://chromiumcodereview.appspot.com/10804039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148926 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Remove unneeded 'using syncer::' lines and 'syncer::' scopingsakalin@chromium.org2012-07-201-9/+6
| | | | | | | | | | | | | | | | | Since (almost) everything in sync/ is now in the 'syncer' namespace, all of these are redundant. Clean up indentation. Put sync_{client,listen_notifications} into syncer namespace. BUG=128060 TEST= Review URL: https://chromiumcodereview.appspot.com/10795018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147675 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Refactor sync manager into interface.zea@chromium.org2012-07-171-0/+1
| | | | | | | | | | | | | | | | | | sync_manager.h now defines a pure interface. The actual implementation is in sync_manager_impl.h/cc. In order to support this, we also create a SyncManagerFactory, which allows us to dependency inject a SyncManager implementation into the SyncBackendHost. Follow up patches will make use of this injection, as well as split the SyncManager tests out of syncapi_unittest. R=akalin@chromium.org BUG=133061 TEST= Review URL: https://chromiumcodereview.appspot.com/10704214 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147076 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Move ModelType and related classes to 'syncer' namespaceakalin@chromium.org2012-07-031-2/+2
| | | | | | | | | | | | | | Previously they were in 'syncer::syncable'. Also remove aliases to those classes from 'syncable'. BUG=128060 TEST= TBR=pkasting@chromium.org,jhawkins@chromium.org, Review URL: https://chromiumcodereview.appspot.com/10696087 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145399 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Move model_type* from syncable/ to base/akalin@chromium.org2012-07-031-1/+1
| | | | | | | | | | | | | | | | | | | Also move enum_set* to base/. This is the first step in moving ModelType et al. to the syncer namespace (from syncer::syncable). Move PurgeStalePayload() back to sync_session.cc. Move ModelTypePayloadMapFromRoutingInfo() to model_safe_worker.* and rename it to ModelSafeRoutingInfoToPayloadMap(). BUG=128060 TEST= Review URL: https://chromiumcodereview.appspot.com/10690071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145236 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Rename csync namespace to syncerakalin@chromium.org2012-06-281-7/+7
| | | | | | | | | | | | | | | Everyone was confused by 'csync'. 'syncer' seems more understandable. (Note that we can't use the 'sync' namespace since sync() is a function from unistd.h.) BUG=10662035 TEST= TBR=jhawkins@chromium.org,pkasting@chromium.org Review URL: https://chromiumcodereview.appspot.com/10698014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144820 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Rename sync_api to csyncakalin@chromium.org2012-06-221-4/+4
| | | | | | | | | | BUG=128060 TEST= Review URL: https://chromiumcodereview.appspot.com/10601002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143557 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Rename browser_sync to csync in sync/akalin@chromium.org2012-06-211-3/+3
| | | | | | | | | | | | | | | Update all references from chrome. Leave possibly-extraneous csync:: qualifications in sync/ for now. (This will be cleaned up once everything in sync/ is in csync::.) BUG=128060 TEST= TBR=jhawkins@chromium.org Review URL: https://chromiumcodereview.appspot.com/10600002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143449 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Remove ClearUserData command.tim@chromium.org2012-06-201-14/+0
| | | | | | | | | BUG=131336 TEST=none Review URL: https://chromiumcodereview.appspot.com/10584019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143088 0039d316-1c4b-4281-b951-d872f2087c98
* sync: move internal_api components used by chrome/browser into ↵tim@chromium.org2012-06-171-1/+1
| | | | | | | | | | | | | | internal_api/public TBR=jhawkins@chromium.org BUG=131130 TEST= Review URL: https://chromiumcodereview.appspot.com/10534080 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142626 0039d316-1c4b-4281-b951-d872f2087c98
* sync: create internal_api/public to house sync/ files needed by ↵tim@chromium.org2012-06-071-2/+2
| | | | | | | | | | | | | | | | | chrome/browser/sync. Note on sync.gyp changes and .cc file moves: most files in /public have .h and their .cc side by side, as they are simple implementations. In some cases like model_type.cc (and others in a follow up patch, like sync_manager.cc) have only their header exposed in /public while the impl stays behind, because it needs to include things from within sync/, and /public has a strict include DEPS policy. This is in accordance with other /public folders (like content/). Cleans up DEPS files in sync + c/b/sync. Adds sync/{engine, sessions, syncable} to public/. There is more to come (moving things in internal_api/ into public). Not touching /notifier as that is in flux at the moment. BUG=131130 TEST= Review URL: https://chromiumcodereview.appspot.com/10532019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141038 0039d316-1c4b-4281-b951-d872f2087c98
* sync: split SyncSessionSnapshot, SyncerStatus, ErrorCounters, and ↵tim@chromium.org2012-06-061-0/+1
| | | | | | | | | | | | | | SyncSourceInfo out of session_state. This is in preparation for moving the snapshot et al to internal_api/public. BUG=131130 TEST=none Review URL: https://chromiumcodereview.appspot.com/10545010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140687 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Convert SyncSessionSnapshot to a copy-able class.zea@chromium.org2012-04-241-2/+2
| | | | | | | | | | | | | | | | | Previously it was an immutable struct that was passed around by making dynamic allocations and passing pointers. We now just have a class with only getters and no setters, but support for default copy and assign. This cleans up some code and makes some future work easier to pass snapshots around. BUG=none TEST=sync_unit_tests Review URL: http://codereview.chromium.org/10197004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133747 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Move 'syncapi_core' and 'sync_unit_tests' targets to sync/akalin@chromium.org2012-04-211-0/+169
Also move related test files. Lock down deps for sync/internal_api. Clean up some deps on chrome/browser/sync. BUG=117585 TEST= Review URL: https://chromiumcodereview.appspot.com/10147003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133349 0039d316-1c4b-4281-b951-d872f2087c98