summaryrefslogtreecommitdiffstats
path: root/sync
Commit message (Collapse)AuthorAgeFilesLines
* Revert r147801 "Refactor sync-specific parts out of ↵maruel@chromium.org2012-07-2226-579/+261
| | | | | | | | | | | | | | | | SyncNotifier/SyncNotifierObserver" This broke sync_integration_tests like it had never been run. Note that sync_integration_tests is not on GateKeeper but redness is still sad. TBR=dcheng@chromium.org BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10806060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147817 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor sync-specific parts out of SyncNotifier/SyncNotifierObserverdcheng@chromium.org2012-07-2126-261/+579
| | | | | | | | | | | Sort of. SendNotification() is still there. Perhaps we want to split the interfaces completely. BUG=124149 TEST=tests should still pass, no observable behavior change Review URL: https://chromiumcodereview.appspot.com/10702074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147801 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Expose change location in GenericChangeProcessor errorszea@chromium.org2012-07-212-0/+5
| | | | | | | | | | BUG=135108 TEST=manual Review URL: https://chromiumcodereview.appspot.com/10803061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147754 0039d316-1c4b-4281-b951-d872f2087c98
* sync: get rid of *ForTest() methods in SyncManagerImpl.tim@chromium.org2012-07-213-79/+64
| | | | | | | | | BUG=117836 TEST=sync_unit_tests Review URL: https://chromiumcodereview.appspot.com/10800043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147751 0039d316-1c4b-4281-b951-d872f2087c98
* mac: Remove code that was only needed on 10.5thakis@chromium.org2012-07-201-25/+1
| | | | | | | | | BUG=137676 TEST=none Review URL: https://chromiumcodereview.appspot.com/10807052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147738 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Remove unneeded 'using syncer::' lines and 'syncer::' scopingsakalin@chromium.org2012-07-20169-1714/+1564
| | | | | | | | | | | | | | | | | 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: Remove SyncInternaltim@chromium.org2012-07-208-792/+559
| | | | | | | | | | | | | Also removes unnecessary functions (like UpdateCryptographerAndNigori). An additional bonus of removing this is that we can remove the ForTest* functions (previously they depended on SyncInternal behavior which wasn't defined in headers). I already had a patch in the works to remove those, so I'll upload that part separately. This is based off of http://codereview.chromium.org/10701046/ BUG=137740 TEST=sync_unit_tests, unit_test Review URL: https://chromiumcodereview.appspot.com/10810020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147582 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Remove SyncManager::TestingMode in favour of InternalComponentsFactory.tim@chromium.org2012-07-1922-1734/+2188
| | | | | | | | | | | Turns SyncScheduler into an interface and adds a FakeSyncScheduler class for tests. BUG=117836 TEST= Review URL: https://chromiumcodereview.appspot.com/10701046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147553 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Track validity of about:sync fieldsrlarocque@chromium.org2012-07-192-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes the way we initialize the fields which get exported to about:sync's about tab. The goal was to pre-declare all the data which would be exported in a complete snapshot, and to track which of these fields were actually set. Unset fields will have a default value and be specially highlighted on about:sync. This commit includes the changes necessary to perform this highlighting. Also in this commit are a few backend changes that are used to determine from sync_ui_util which fields are properly initialized and which fields have been unset by anything other than a default constructor. The signature for ProfileSyncService::QueryDetailedSyncStatus() has been modified to return an additional parameter indicating whether or not the returned status actually came from the backend. The SyncSesionSnapshot takes a different approach. The object is immutable and has two constructors. If it is constructed with the zero-argument constructor it is clearly uninitialized, and will remain so. This change adds a flag which is set or unset based on which constructor is used. Finally, the ConstructAboutInforation function and all its helpers have been moved out of sync_ui_util.cc and into their own file. BUG=134927 TEST= Review URL: https://chromiumcodereview.appspot.com/10696107 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147531 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Add sync_export.h (Step 1 for componentizing sync)akalin@chromium.org2012-07-1811-22/+101
| | | | | | | | | | | | | | | | Add SYNC_EXPORT{,_PRIVATE} annotations to stuff in internal_api/public/{base,engine} in the 'sync' target. Add some componentization-related TODOs. Annotate sync-related test executables with SYNC_TEST. BUG=136928 TEST= Review URL: https://chromiumcodereview.appspot.com/10700180 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147325 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Refactor SyncBackendHost unit tests.zea@chromium.org2012-07-183-0/+342
| | | | | | | | | | | | | | We introduce a fake sync manager to let us properly unit test the SyncBackendHost and a bunch of tests verifying Initialize/Configure behavior. BUG=none TEST=self Review URL: https://chromiumcodereview.appspot.com/10790018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147146 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Refactor sync manager into interface.zea@chromium.org2012-07-1713-288/+477
| | | | | | | | | | | | | | | | | | 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
* Finish commit 146665: [Sync] Refactor sync configuration logic.zea@chromium.org2012-07-1312-256/+614
| | | | | | | | | | | | | | Only the last patchset (which was a partial diff) was committed.. Original codereview at: https://chromiumcodereview.appspot.com/10780002/ TBR=rlarocque@chromium.org BUG=129665 TEST= Review URL: https://chromiumcodereview.appspot.com/10791002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146677 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 146262 - Revert "Revert 142517 - [Sync] Refactor sync configuration ↵zea@chromium.org2012-07-1312-614/+256
| | | | | | | | | | | | | | | | | | | | | | | | | | logic." Relanding with improved tests and support for cleaning up partial nigori. The original patch was reverted due to users who needed to download a new nigori node, but who had since been migrated. We do not handle migration before the backend is initialized, so we now go ahead and detect+delete partial nigori nodes before redownloading them. By blowing away the old progress marker, we're no longer at risk of receiving the migration done response. In order to test this the SyncBackendHost unit tests have been substantially upgraded. original review at: https://chromiumcodereview.appspot.com/10483015 BUG=129665,133061,133219 TEST=unit/integration tests Review URL: https://chromiumcodereview.appspot.com/10701085 TBR=zea@chromium.org Review URL: https://chromiumcodereview.appspot.com/10689185 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146501 0039d316-1c4b-4281-b951-d872f2087c98
* Remove syncproto.hrlarocque@chromium.org2012-07-1235-290/+277
| | | | | | | | | | | | | | | | | | | | | | Replace sync/engine/syncproto.h with sync/syncable/syncable_proto_util.h and .cc. The tasks that used to be performed by member functions of the syncer:: proto wrapper classes are now handled by static member functions. Unfortunately, serialization and de-serialization of syncable::Id to/from proto fields has gotten a bit uglier. On the other hand, it's now much less magical and mysterious. The test intended to prevent regressions of crbug.com/134715 has been replaced with a DCHECK. We'll have to rely on it to ensure that the protocol_version field is always explicitly set. BUG=136454 TEST= Review URL: https://chromiumcodereview.appspot.com/10735041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146393 0039d316-1c4b-4281-b951-d872f2087c98
* Switch to TimeDelta interfaces for TestTimeouts in sync code.tedvessenes@gmail.com2012-07-122-3/+2
| | | | | | | | | | | R=akalin@chromium.org BUG=108171 TEST= Review URL: https://chromiumcodereview.appspot.com/10689157 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146282 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Revert 142517 - [Sync] Refactor sync configuration logic."zea@chromium.org2012-07-1212-256/+614
| | | | | | | | | | | | | | | | | | | | | Relanding with improved tests and support for cleaning up partial nigori. The original patch was reverted due to users who needed to download a new nigori node, but who had since been migrated. We do not handle migration before the backend is initialized, so we now go ahead and detect+delete partial nigori nodes before redownloading them. By blowing away the old progress marker, we're no longer at risk of receiving the migration done response. In order to test this the SyncBackendHost unit tests have been substantially upgraded. original review at: https://chromiumcodereview.appspot.com/10483015 BUG=129665,133061,133219 TEST=unit/integration tests Review URL: https://chromiumcodereview.appspot.com/10701085 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146262 0039d316-1c4b-4281-b951-d872f2087c98
* Remove #pragma once from syncajwong@chromium.org2012-07-11144-144/+0
| | | | | | Review URL: https://chromiumcodereview.appspot.com/10700154 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146074 0039d316-1c4b-4281-b951-d872f2087c98
* Reland r145993.zea@chromium.org2012-07-113-8/+25
| | | | | | | | | | | | | | | | | | | | Original codereview at http://codereview.chromium.org/10766016/ [Sync] Add location parameter to SyncChange in Sync API. SyncChanges now require the location they were created as a parameter. This is then used in the case that the change violates and invariant. We display the location and type of erroneous change in about:sync, in addition to disabling the offending datatype. TBR=stevet@chromium.org, rlarocque@chromium.org BUG=135108 TEST=unit_tests Review URL: https://chromiumcodereview.appspot.com/10690128 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146050 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 145993 - [Sync] Add location parameter to SyncChange in Sync API.zea@chromium.org2012-07-103-25/+8
| | | | | | | | | | | | | | | | | | | SyncChanges now require the location they were created as a parameter. This is then used in the case that the change violates and invariant. We display the location and type of erroneous change in about:sync, in addition to disabling the offending datatype. TBR=kalman@chromium.org, mnissler@chromium.org, isherman@chromium.org BUG=135108 TEST=unit_tests Review URL: https://chromiumcodereview.appspot.com/10766016 TBR=zea@chromium.org Review URL: https://chromiumcodereview.appspot.com/10698141 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145996 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Add location parameter to SyncChange in Sync API.zea@chromium.org2012-07-103-8/+25
| | | | | | | | | | | | | | | | SyncChanges now require the location they were created as a parameter. This is then used in the case that the change violates and invariant. We display the location and type of erroneous change in about:sync, in addition to disabling the offending datatype. TBR=kalman@chromium.org, mnissler@chromium.org, isherman@chromium.org BUG=135108 TEST=unit_tests Review URL: https://chromiumcodereview.appspot.com/10766016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145993 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Move ModelType and related classes to 'syncer' namespaceakalin@chromium.org2012-07-03132-1218/+1078
| | | | | | | | | | | | | | 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: Fix and test delete of server-unknown itemsrlarocque@chromium.org2012-07-033-3/+27
| | | | | | | | | | | | | | | | | | | | | | | | The fix we settled on for issue 125381 was to unset the unsynced bit for items which were created and deleted locally, before the server was ever iuformed of their existence. The server doesn't like being notified of deletions to items it never knew existed, as we learned with issue 132905. It turns out that the syncapi was deleting items in a way that bypassed the originally attempted fix for issue 125381 in r137476. This shows that the testing of the original fix was inadequate. This commit fixes the bug and improves testing, with the hope of preventing these bugs from reoccuring in the future. The fix is so subtle that I doubt anything other than lots and lots of tests will be able to prevent regressions. BUG=134934,125381 TEST= Review URL: https://chromiumcodereview.appspot.com/10703060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145380 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Add sync_client toolakalin@chromium.org2012-07-034-43/+444
| | | | | | | | | | | | | | | | sync_client is a command-line sync client. Currently, it just downloads the sync data for the given user and listens for new changes. Fix logging in server_connection_manager.cc. Clean up sync_listen_notifications a bit. BUG=135536 TEST= Review URL: https://chromiumcodereview.appspot.com/10704071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145254 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Move MarkForSyncing to mutable_entry.ccrlarocque@chromium.org2012-07-032-10/+10
| | | | | | | | | | | | | | | Prior to this change, the function was declared in mutable_entry.h and defined in syncable_util.cc. This was the result of an error in r143218, which split syncable.cc into several files. This commit fixes the error by moving the defintion of the function. BUG=103332 TEST= Review URL: https://chromiumcodereview.appspot.com/10696083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145252 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Remove GetPossibleLastChildForTest()rlarocque@chromium.org2012-07-032-32/+1
| | | | | | | | | | | | | | | | Remove GetPossibleLastChildForTest(). Its only use was in GetLastChildForTest() to make an informed guess as to which entry was the last one under a given parent. That function will return the same results if we use GetPossibleFirstChild() to initialize our guess. In theory this new approach will be slower, but in practice the change will be imperceptible. BUG=135483 TEST= Review URL: https://chromiumcodereview.appspot.com/10703064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145250 0039d316-1c4b-4281-b951-d872f2087c98
* Improve logging in server_connection_manager.ccakalin@chromium.org2012-07-031-1/+2
| | | | | | | | | | | | Convert enum to string before logging. BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10698075 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145249 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Move model_type* from syncable/ to base/akalin@chromium.org2012-07-0394-199/+202
| | | | | | | | | | | | | | | | | | | 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: Remove unused IdFilter classrlarocque@chromium.org2012-07-032-23/+0
| | | | | | | | | | | | In r145032, we removed all uses of the IdFilter class, but forgot to remove its definition. This commit corrects that error. BUG=134934 TEST= Review URL: https://chromiumcodereview.appspot.com/10702069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145234 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Move sync/{internal_api,syncable} into syncer namespaceakalin@chromium.org2012-07-02107-269/+419
| | | | | | | | | | | | | | Add temporary aliases from syncable::* to syncer::syncable::* for ModelType and related classes until those are ported to syncer proper. Disambiguate names in MockConnectionManager. BUG=128060 TEST= Review URL: https://chromiumcodereview.appspot.com/10699044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145211 0039d316-1c4b-4281-b951-d872f2087c98
* base: Remove dereference structure operator (i.e ->) from ScopedVector.tfarina@chromium.org2012-06-301-5/+5
| | | | | | | | | BUG=128663 R=brettw@chromium.org,willchan@chromium.org Review URL: https://chromiumcodereview.appspot.com/10669038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145073 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Move invariant check logic into Directoryrlarocque@chromium.org2012-06-294-103/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | The goal of this change is to allow runtime changes to the level of invariant checking. This will allow us to write unit tests which better protect us against issue 125381. We failed to prevent issue 134934 in part because our tests against this scenario were not sufficiently strict. In the future, it may allow us to raise the level of checking that we enforce in test code by letting us increase the strictness on a case-by-case basis, thus saving us the trouble of having to fix all our tests at once. Along the way, this change modifies the way the invariant-checking functions are invoked. The end result is a bit simpler, though it does have the side-effect of slightly increasing the strictness of the tests. The CHANGES_ONLY checks will now ensure that all modified entries have valid parents. This level of checking would previously be performed only if the item's parent was also changed. The change also removes the invariant check timeout. BUG=134934 TEST=sync_unit_tests, unit_tests --gtest_filter='*Sync*' Review URL: https://chromiumcodereview.appspot.com/10693041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145032 0039d316-1c4b-4281-b951-d872f2087c98
* Remove syncable::ModelType usage from ChromeInvalidationClientdcheng@chromium.org2012-06-296-117/+134
| | | | | | | | | BUG=124149 TEST=sync_unit_tests Review URL: https://chromiumcodereview.appspot.com/10622002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145026 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Move nigori_util* to sync/syncableakalin@chromium.org2012-06-2924-201/+179
| | | | | | | | | | | | | | | | | | | | | | It's already in the syncable namespace, so syncable/ seems like a better place for it. Move a function from syncer_util.h. to syncable_util.h. Remove pseudo-namespace class SyncerUtil. After this change, everything in sync/engine will be in the syncer namespace. Also clean up some whitespace. BUG=128060 TEST= Review URL: https://chromiumcodereview.appspot.com/10704034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144977 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Rename csync namespace to syncerakalin@chromium.org2012-06-28303-1063/+1059
| | | | | | | | | | | | | | | 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
* Include <iterator>.hbono@chromium.org2012-06-281-0/+1
| | | | | | | | | | This change includes <iterator>, which is needed by std::inserter, to fix build errors on VS2010. BUG=none TEST=fix builds. Review URL: https://chromiumcodereview.appspot.com/10702020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144666 0039d316-1c4b-4281-b951-d872f2087c98
* Convert sync_notifier::RegistrationManager to use object IDs.dcheng@chromium.org2012-06-286-329/+361
| | | | | | | | | | | | | This is part of the continued effort to refactor the sync code out of the invalidation client. BUG=124149 TEST=sync_unit_tests --gtest_filter=RegistrationManagerTest.* Review URL: https://chromiumcodereview.appspot.com/10548063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144660 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Make Login class listen to connection and DNS changesakalin@chromium.org2012-06-282-3/+13
| | | | | | | | | | | | | | | | | | Make sync_listen_notifications listen for network changes. Add a scoped NSAutoreleasePool to sync_listen_notifications. Relax DEPS for sync/tools a bit. BUG=106034 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=144382 Review URL: https://chromiumcodereview.appspot.com/10675012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144622 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unused fields found by clang's new Wunused-private-fields.thakis@chromium.org2012-06-272-3/+1
| | | | | | | | | | | | Test file edition. BUG=none TEST=none TBR=remaining owners Review URL: https://chromiumcodereview.appspot.com/10680013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144464 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 144382 - [Sync] Make Login class listen to connection and DNS changesnkostylev@chromium.org2012-06-272-13/+3
| | | | | | | | | | | | | | | | | | | | | | Reason: http://build.chromium.org/p/chromium/builders/Mac10.6%20Sync/builds/19046 Make sync_listen_notifications listen for network changes. Add a scoped NSAutoreleasePool to sync_listen_notifications. Relax DEPS for sync/tools a bit. BUG=106034 TEST= Review URL: https://chromiumcodereview.appspot.com/10675012 TBR=akalin@chromium.org Review URL: https://chromiumcodereview.appspot.com/10690007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144439 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Put everything in sync/api into csync namespaceakalin@chromium.org2012-06-2718-4/+72
| | | | | | | | | | BUG=128060 TEST= TBR=pkasting@chromium.org Review URL: https://chromiumcodereview.appspot.com/10662035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144385 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Make Login class listen to connection and DNS changesakalin@chromium.org2012-06-272-3/+13
| | | | | | | | | | | | | | | | Make sync_listen_notifications listen for network changes. Add a scoped NSAutoreleasePool to sync_listen_notifications. Relax DEPS for sync/tools a bit. BUG=106034 TEST= Review URL: https://chromiumcodereview.appspot.com/10675012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144382 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Set explicit protocol_version on commitrlarocque@chromium.org2012-06-272-0/+4
| | | | | | | | | | | | | | The use of Message::Clear() function in commit.cc was unsetting this field. This change explicitly sets the field to the current default value following the Clear(). It also adds a test assertion to verify that the field is properly set. BUG=134769,134715 TEST=Run against the test server and verify the field is in the logs. Review URL: https://chromiumcodereview.appspot.com/10679010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144339 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Create sync entry factory class for testsrlarocque@chromium.org2012-06-265-244/+334
| | | | | | | | | | | | | | | | | Move some of the helper functions embedded in ApplyUpdatesCommandUnittest into a separate class. This will make it easier to reuse this code in other test cases. This CL is a prerequisite for some upcoming changes that move Nigori update application out of ApplyUpdatesCommand. BUG=111297 TEST= Review URL: https://chromiumcodereview.appspot.com/10658006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144326 0039d316-1c4b-4281-b951-d872f2087c98
* Use base::ThreadChecker as a member var, rather than base::NonThreadSafersleevi@chromium.org2012-06-252-15/+15
| | | | | | | | | | BUG=123295 TEST=existing Review URL: https://chromiumcodereview.appspot.com/10663016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144011 0039d316-1c4b-4281-b951-d872f2087c98
* sync: inject DirectoryBackingStore to Directory and remove ↵tim@chromium.org2012-06-226-113/+100
| | | | | | | | | | | | | | "OpenInMemoryForTest" method from production code. This resulted in consolidated some SyncManager::TestingMode code to the Init code path from OpenDirectory. This is a step towards removing TestingMode in favor of some SyncManager init factories. See bug 117836 BUG=117836 TEST=sync_unit_tests Review URL: https://chromiumcodereview.appspot.com/10641025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143688 0039d316-1c4b-4281-b951-d872f2087c98
* More fixes to address missing symbols when building unit-tests on Android.jcivelli@chromium.org2012-06-221-2/+2
| | | | | | | | | | BUG=None TEST=None Review URL: https://chromiumcodereview.appspot.com/10641007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143685 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Refactor session tracking rlarocque@chromium.org2012-06-2229-477/+255
| | | | | | | | | | | | | | | | | | | | | | | This change refactors the related structs ErrorCounters, SyncerStatus, and SyncCycleControlParameters. Their values have all been merged into AllModelTypeState, which has been renamed to ModelNeutralState. All the functions which depend on this data have been updated to use the new struct. This change also removes the DirtyOnWrite template class, the is_dirty flag, and the SyncerCommand logic to send change events if it detects a change in the syncer's status. The changes are so frequent and predictable that it's easier to just send the snapshots manually after any major syncer steps. Finally, this change removes the 'invalid_store' status member, which was never set nor read outside of unit tests. BUG=132630 TEST= Review URL: https://chromiumcodereview.appspot.com/10636010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143675 0039d316-1c4b-4281-b951-d872f2087c98
* Removes reference counting of syncable::Directory::Kernelrlarocque@chromium.org2012-06-222-22/+2
| | | | | | | | | | | No longer required, syncable::Directory is responsible now for deleting the dir kernel BUG=119360 Review URL: https://chromiumcodereview.appspot.com/10540089 Patch from Sergio Carlos Morales Angeles <carloschilazo@gmail.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143610 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Move HttpBridge to sync/akalin@chromium.org2012-06-2216-34/+971
| | | | | | | | | | | | | | Remove all references to content in HttpBridge. Clean up handling of HTTP user agent in HttpBridge. BUG=133791 TEST= Review URL: https://chromiumcodereview.appspot.com/10645004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143575 0039d316-1c4b-4281-b951-d872f2087c98