summaryrefslogtreecommitdiffstats
path: root/sync/tools
Commit message (Collapse)AuthorAgeFilesLines
* Sync user's custom spellcheck dictionaryrouslan@chromium.org2013-01-231-2/+7
| | | | | | | | | | | | | | This CL is initial work for for syncing user dictionary across multiple computers. The sync is hidden behind --enable-sync-dictionary flag for now. Do not flip this flag unless your are connected to a sync server that supports dictionary sync. If you don't know whether your sync server supports dictionary sync, then most likely it does not. BUG=51636 Review URL: https://chromiumcodereview.appspot.com/11445002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178178 0039d316-1c4b-4281-b951-d872f2087c98
* [sync] Divorce python sync test server chromiumsync.py from testserver.pyrsimha@chromium.org2013-01-208-0/+3614
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various chrome test suites use the infrastructure in net::LocalTestServer and net/tools/testserver.py to create local test server instances against which to run automated tests. Sync tests use reference implementations of sync and xmpp servers, which build on the testserver infrastructure in net/. In the past, the sync testserver was small enough that it made sense for it to be a part of the testserver in net/. This, however, resulted in an unwanted dependency from net/ onto sync/, due to the sync proto modules needed to run a python sync server. Now that the sync testserver has grown considerably in scope, it is time to separate it out from net/ while reusing base testserver code, and eliminate the dependency from net/ onto sync/. This work also provides us with the opportunity to remove a whole bunch of dead pyauto sync test code in chrome/test/functional. This patch does the following: - Moves the native class LocalSyncTestServer from net/test/ to sync/test/. - Moves chromiumsync{_test}.py and xmppserver{_test}.py from net/tools/testserver/ to sync/tools/testserver/. - Removes all sync server specific code from net/. - Adds a new sync_testserver.py runner script for the python sync test. - Moves some base classes from testserver.py to testserver_base.py so they can be reused by sync_testserver.py. - Audits all the python imports in testserver.py, testserver_base.py and sync_testserver.py to make sure there are no unnecessary / missing imports. - Adds a new run_sync_testserver runner executable to launch a sync testserver. - Removes a couple of static methods from LocalTestServer, that were being used by run_testserver, and refactors run_sync_testserver to use their non-static versions. - Adds the ability to run both chromiumsync_test.py and xmppserver_test.py from run_sync_testserver. - Fixes chromiumsync.py to undo / rectify some older changes that broke tests in chromiumsync_test.py. - Adds a new test target called test_support_sync_testserver to sync.gyp. - Removes the hacky dependency on sync_proto from net.gyp:net_test_support. - Updates various gyp files across chrome to use the new sync testserver target. - Audits dependencies of net_test_support, run_testserver, and the newly added targets. - Fixes the android chrome testserver spawner script to account for the above changes. - Removes all mentions of TYPE_SYNC from the pyauto TestServer shim. - Deletes all (deprecated) pyauto sync tests. (They had all become broken over time, gotten disabled, and were all redundant due to their equivalent sync integration tests.) - Removes all sync related pyauto hooks from TestingAutomationProvider, since they are no longer going to be used. - Takes care of a TODO in safe_browser_testserver.py to remove an unnecessary code block. Note: A majority of the bugs listed below are for individual pyauto sync tests. Deleting the sync pyauto test script fixes all these bugs in one fell swoop. TBR=mattm@chromium.org BUG=117559, 119403, 159731, 15016, 80329, 49378, 87642, 86949, 88679, 104227, 88593, 124913 TEST=run_testserver, run_sync_testserver, sync_integration_tests, sync_performance_tests. All chrome tests that use a testserver should continue to work. Review URL: https://codereview.chromium.org/11971025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177864 0039d316-1c4b-4281-b951-d872f2087c98
* Implement features needed for local ack handling in InvalidationStateTracker.dcheng@chromium.org2012-12-054-73/+108
| | | | | | | | | | | Adds the ability to save payloads in InvalidationStateTracker, and also adds the functionality to generate, track, and acknowledge local ack handles. BUG=124149 Review URL: https://codereview.chromium.org/11415049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171165 0039d316-1c4b-4281-b951-d872f2087c98
* Sync: Add DeviceInfo's ChangeProcessorrlarocque@chromium.org2012-11-211-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the long-awaited change to enable DeviceInfo tracking. Long ago (r161496) we committed code to support the DeviceInfo type, but we had to leave this code disabled until the server was ready to support the new type. That support has now been added. This change includes a very special kind of ChangeProcessor named SyncedDeviceTracker. It is the only ChangeProcessor that is owned by the sync thread. The SyncBackendHost creates and initializes it during backend intialization and deletes it before the UserShare it references is destroyed. As part of its initialization, the SyncedDeviceTracker will update the DeviceInfo entry for the current device. The SyncedDeviceTracker could support sending notifications to any interested listeners when new or update DeviceInfo information arrives, but this functionality has not been implemented yet. Also included are: - Tests for the SyncedDeviceTracker - A MockTransactionObserver to support these tests - A cache_guid() accessor on the SyncManager, used to initialize the SyncedDeviceTracker - Remove support for default constructing a DeviceInfo object BUG=122825 Review URL: https://chromiumcodereview.appspot.com/11360259 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168972 0039d316-1c4b-4281-b951-d872f2087c98
* Move scoped_temp_dir from base to base/filesbrettw@chromium.org2012-11-161-3/+3
| | | | | | | | | | Also add to base namespace. BUG= Review URL: https://codereview.chromium.org/11359217 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168281 0039d316-1c4b-4281-b951-d872f2087c98
* Reland 167337 - Move url_request_test_util into net namespacejochen@chromium.org2012-11-132-6/+6
| | | | | | | | | | | | | | | This file contains some rather generic names like "TestDelegate". Move it to the net namespace to avoid collisions BUG=none TBR=wtc@chromium.org,darin@chromium.org Original Review URL: https://codereview.chromium.org/11369179 Review URL: https://chromiumcodereview.appspot.com/11365227 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167413 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 167337 - Move url_request_test_util into net namespacejochen@chromium.org2012-11-132-6/+6
| | | | | | | | | | | | | | | This file contains some rather generic names like "TestDelegate". Move it to the net namespace to avoid collisions BUG=none TBR=darin@chromium.org Review URL: https://codereview.chromium.org/11369179 TBR=jochen@chromium.org Review URL: https://codereview.chromium.org/11410066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167356 0039d316-1c4b-4281-b951-d872f2087c98
* Move url_request_test_util into net namespacejochen@chromium.org2012-11-132-6/+6
| | | | | | | | | | | | This file contains some rather generic names like "TestDelegate". Move it to the net namespace to avoid collisions BUG=none TBR=darin@chromium.org Review URL: https://codereview.chromium.org/11369179 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167337 0039d316-1c4b-4281-b951-d872f2087c98
* Transaction version is used to detect out-of-sync between sync model and ↵haitaol@chromium.org2012-10-261-0/+1
| | | | | | | | | | | native model. The values in sync model and native model should be equal. If not, there're some changes that are applied in one but not the other. This change updates the transaction version of a model type in sync when changes to its native model are found. And implement native transaction version for bookmark model. BUG=154858 Review URL: https://chromiumcodereview.appspot.com/11028146 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164263 0039d316-1c4b-4281-b951-d872f2087c98
* [net] Change factory methods for HostResolver and HostCache to return a ↵szym@chromium.org2012-10-222-8/+2
| | | | | | | | | | | | scoped_ptr. Move HostResolver factory methods to host_resolver.cc. This also fixes a double-free in ShellURLRequestContextGetter. Review URL: https://chromiumcodereview.appspot.com/10831277 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163402 0039d316-1c4b-4281-b951-d872f2087c98
* Add the InvalidationState struct to bundle local state about invalidations.dcheng@chromium.org2012-10-192-4/+4
| | | | | | | | | | | Currently this only has one member, but I anticipate adding several more as we add support for local acknowledgements. BUG=124149 Review URL: https://codereview.chromium.org/11229015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163077 0039d316-1c4b-4281-b951-d872f2087c98
* Rename ModelType/ObjectIdStateMap to InvalidationMap.dcheng@chromium.org2012-10-041-6/+7
| | | | | | | | | | BUG=none TBR=sky Review URL: https://chromiumcodereview.appspot.com/11052007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160073 0039d316-1c4b-4281-b951-d872f2087c98
* Rename InvalidationState to BootstrapDatadcheng@chromium.org2012-10-032-10/+10
| | | | | | | | | | | | | | | We have a lot of things called 'state' in sync/, so we're renaming them to better reflect their actual purpose. The 'state' in this CL is used for bootstrapping a connection to the cache invalidation server, so we don't need to go through the process of re-registering each ID we're interested in each time we reconnect. BUG=none Review URL: https://chromiumcodereview.appspot.com/11050005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159845 0039d316-1c4b-4281-b951-d872f2087c98
* [Invalidations] Add GetInvalidatorState() to Invalidator{,Frontend}akalin@chromium.org2012-09-071-12/+7
| | | | | | | | | | | | | | | | | | | | | | | | Combine OnNotifications{Enabled,Disabled}() into OnInvalidatorStateChange(). Replace NotificationsDisabledReason with InvalidatorState. Rename OnIncomingNotification to OnIncomingInvalidation. Also change some references of "notification" to "invalidation". Set the initial invalidator state in ChromeToMobileService. Also remove OnNotificationsEnabled() call from OnIncomingInvalidation(). Instantiate InvalidatorTest template for ProfileSyncService. Move comments for invalidation-related functions from ProfileSyncService to InvalidatorFrontend. Put DISALLOW_COPY_AND_ASSIGN on some classes. Fix comment in invalidator.h. BUG=142475 TBR=brettw@chromium.org Review URL: https://chromiumcodereview.appspot.com/10916131 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155448 0039d316-1c4b-4281-b951-d872f2087c98
* Add InvalidationStateTracker::Forget() to erase an entry from storage.dcheng@chromium.org2012-09-042-0/+12
| | | | | | | | | BUG=none Review URL: https://chromiumcodereview.appspot.com/10824140 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154826 0039d316-1c4b-4281-b951-d872f2087c98
* Rename SyncNotifier->Invalidator and SyncNotifierObserver->InvalidationHandler.dcheng@chromium.org2012-08-282-17/+17
| | | | | | | | | | | | | This makes the naming more consistent with how the various classes and interfaces are used, since they are not sync-specific anymore. BUG=none TBR=sky Review URL: https://chromiumcodereview.appspot.com/10875064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153619 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor ModelTypePayloadMap and ObjectIdPayloadMap to StateMaps.dcheng@chromium.org2012-08-241-7/+7
| | | | | | | | | | | | | This lays the groundwork for allowing us to pass ack handles for object IDs to SyncNotifierObservers. BUG=124149 TEST=none, there should be no behavior change. Review URL: https://chromiumcodereview.appspot.com/10837214 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153158 0039d316-1c4b-4281-b951-d872f2087c98
* sync: add InternalComponentsFactory::Switches to simplify passing switches ↵tim@chromium.org2012-08-151-2/+6
| | | | | | | | | | | | | | | | | | to internal components. Cleans up backoff retry override code to use InternalComponentsFactory::Switches rather than global bool hack. Also puts keystore encryption flag atop new mechanism. (TBR sky for new chrome_switch). TBR=sky@chromium.org BUG=142029, 139839 Review URL: https://chromiumcodereview.appspot.com/10837231 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151664 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Avoid unregistering object IDs on shutdownakalin@chromium.org2012-08-101-1/+4
| | | | | | | | | | | | | | | | | | | | | | Add RegisterHandler() and UnregisterHandler(), which should be called before and after calls to UpdateRegisteredIds(). Use UnregisterHandler() on shutdown instead of UpdateRegisteredIds(_, ObjectIdSet()). Make SyncNotifierHelper non-thread-safe. Fix test breakages that this revealed. Also add GetAllRegisteredIds() instead of making it the return value of UpdateRegisteredIds(). Propagate UpdateRegisteredIds()/RegisterHandler()/UnregisterHandler() all the way up to ProfileSyncService. Make FakeSyncManager be created on the sync thread. Clean up SyncBackendHost startup/shutdown behavior a bit. BUG=140325 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=150990 Review URL: https://chromiumcodereview.appspot.com/10824161 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151107 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 150990 - [Sync] Avoid unregistering object IDs on shutdownjeremya@chromium.org2012-08-101-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | Add RegisterHandler() and UnregisterHandler(), which should be called before and after calls to UpdateRegisteredIds(). Use UnregisterHandler() on shutdown instead of UpdateRegisteredIds(_, ObjectIdSet()). Make SyncNotifierHelper non-thread-safe. Fix test breakages that this revealed. Also add GetAllRegisteredIds() instead of making it the return value of UpdateRegisteredIds(). Propagate UpdateRegisteredIds()/RegisterHandler()/UnregisterHandler() all the way up to ProfileSyncService. Make FakeSyncManager be created on the sync thread. Clean up SyncBackendHost startup/shutdown behavior a bit. BUG=140325 Review URL: https://chromiumcodereview.appspot.com/10824161 TBR=akalin@chromium.org Review URL: https://chromiumcodereview.appspot.com/10824252 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150992 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Avoid unregistering object IDs on shutdownakalin@chromium.org2012-08-101-1/+4
| | | | | | | | | | | | | | | | | | | | | Add RegisterHandler() and UnregisterHandler(), which should be called before and after calls to UpdateRegisteredIds(). Use UnregisterHandler() on shutdown instead of UpdateRegisteredIds(_, ObjectIdSet()). Make SyncNotifierHelper non-thread-safe. Fix test breakages that this revealed. Also add GetAllRegisteredIds() instead of making it the return value of UpdateRegisteredIds(). Propagate UpdateRegisteredIds()/RegisterHandler()/UnregisterHandler() all the way up to ProfileSyncService. Make FakeSyncManager be created on the sync thread. Clean up SyncBackendHost startup/shutdown behavior a bit. BUG=140325 Review URL: https://chromiumcodereview.appspot.com/10824161 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150990 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Set transport_security_state for sync_{client,listen_notifications}akalin@chromium.org2012-08-032-0/+6
| | | | | | | | | | | Currently, the DCHECK added by r148251 fires. BUG= Review URL: https://chromiumcodereview.appspot.com/10830164 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149928 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Persist keystore key across restartszea@chromium.org2012-08-011-0/+2
| | | | | | | | | | | | | | | | Adds the preference for the bootstrap token and the bootstrapping functionality in the cryptographer so that we persist the keystore key across restarts. With this, we should only ever do one GetKey per client, and only on the first time that client signs in/restarts on a version with GetKey support (although it's not persisted across signouts/profile nukes) BUG=129665 TEST=unit_tests Review URL: https://chromiumcodereview.appspot.com/10540149 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149344 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Add support for performing a GetKey on startup.zea@chromium.org2012-07-311-0/+1
| | | | | | | | | | | | | | | | | The functionality is behind the --sync-keystore-encryption flag, and the key is not currently consumed by anything, but this lays the groundwork for testing the server and client interaction. We request a key anytime we perform a GetUpdates while the cryptographer does not have a keystore key. But, it is considered an error to request a key and not receive one, putting us into a state of backoff. BUG=129665 TEST=sync_unit_tests, running against python server Review URL: https://chromiumcodereview.appspot.com/10455012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149248 0039d316-1c4b-4281-b951-d872f2087c98
* Make SyncBackendRegistrar aware of loaded datarlarocque@chromium.org2012-07-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Refactor sync-specific parts out of SyncNotifier/SyncNotifierObserverdcheng@chromium.org2012-07-271-4/+6
| | | | | | | | | | | | | | | | 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 NOTRY=true Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=147801 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=148496 Review URL: https://chromiumcodereview.appspot.com/10702074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148697 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r148496 "Refactor sync-specific parts out of ↵maruel@chromium.org2012-07-261-6/+4
| | | | | | | | | | | | | | | | | SyncNotifier/SyncNotifierObserver" It broke sync_integration_tests: TwoClientExtensionSettingsAndAppSettingsSyncTest.AppsStartWithSameSettings TwoClientExtensionSettingsAndAppSettingsSyncTest.AppsStartWithDifferentSettings TBR=dcheng@chromium.org BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10823037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148536 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor sync-specific parts out of SyncNotifier/SyncNotifierObserverdcheng@chromium.org2012-07-261-4/+6
| | | | | | | | | | | | | | 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 NOTRY=true Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=147801 Review URL: https://chromiumcodereview.appspot.com/10702074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148496 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r147801 "Refactor sync-specific parts out of ↵maruel@chromium.org2012-07-221-6/+4
| | | | | | | | | | | | | | | | 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-211-4/+6
| | | | | | | | | | | 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] Remove unneeded 'using syncer::' lines and 'syncer::' scopingsakalin@chromium.org2012-07-202-65/+73
| | | | | | | | | | | | | | | | | 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-202-2/+2
| | | | | | | | | | | | | 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-191-3/+3
| | | | | | | | | | | 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] Refactor sync manager into interface.zea@chromium.org2012-07-171-6/+11
| | | | | | | | | | | | | | | | | | 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-032-10/+10
| | | | | | | | | | | | | | 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] Add sync_client toolakalin@chromium.org2012-07-033-43/+426
| | | | | | | | | | | | | | | | 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 model_type* from syncable/ to base/akalin@chromium.org2012-07-032-3/+3
| | | | | | | | | | | | | | | | | | | 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-12/+12
| | | | | | | | | | | | | | | 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] 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
* 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] 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] Rename sync_api to csyncakalin@chromium.org2012-06-221-1/+1
| | | | | | | | | | 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
* Convert InvalidationStateTracker to use invalidation::ObjectId instead of ↵dcheng@chromium.org2012-06-201-2/+3
| | | | | | | | | | | syncable::ModelType BUG=124145,124149 TEST=unit tests Review URL: https://chromiumcodereview.appspot.com/10545168 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143249 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Rename sync_notifier namespace to csyncakalin@chromium.org2012-06-201-10/+10
| | | | | | | | | | | | There's already a function in the global namespace named 'sync', so we can't use it as a namespace name. :( BUG=128060 TEST= Review URL: https://chromiumcodereview.appspot.com/10581019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143124 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Propagate XMPP auth errors to SyncNotifierObserversakalin@chromium.org2012-06-181-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | Detect XMPP auth errors and add new notifications to SingleLoginAttempt and Login. Replace PushClientObserver::OnNotificationStateChange with OnNotifications{Enabled,Disabled} notifications. Change SyncNotifierObserver similarly. Handle InvalidationClient errors and propagate auth errors from that, too. Propagate XMPP auth errors all the way up to SyncManager. It will be handled in a future CL. BUG=38091 TEST= Review URL: https://chromiumcodereview.appspot.com/10545170 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142806 0039d316-1c4b-4281-b951-d872f2087c98
* sync: create internal_api/public to house sync/ files needed by ↵tim@chromium.org2012-06-072-4/+3
| | | | | | | | | | | | | | | | | 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: migrate invalidation state from syncable::Directory to InvalidationStoragetim@chromium.org2012-05-311-7/+0
| | | | | | | | | | | | | | | | | | | | | | | Deprecates SyncNotifier::SetState, as this is needed only to plumb notification state from the syncable::Directory to notifier. It is still in use to facilitate migration. Migration for an existing sync setup works as follows: 1) normal SyncManager::Init occurs, which calls SetState on notifier. 2) The InvalidationNotifier takes the state received in SetState and echoes it back through the InvalidationStateTracker) which is the new store. It does this in addition to normal stashing, to hand to ChromeInvalidationClient when needed. 3) On a subsequent restart, the SyncNotifierFactory will see a non-empty initial invalidation state in the InvalidationStateTracker, and pass this down on creation to notifier components. 4) SetState calls will now be no-ops, as the invalidation state will be non-empty, and it can only be set once on this code path. UMA tracks the number of "worthwhile" SetStateDeprecated calls for a rough global migration progress. At some point in the future, once these bits have served all (statistically speaking) users, the SetStateDeprecated call can be removed entirely and the syncable::Directory schema updated to remove existing and unnecessary columns. I did not remove the column from DirectoryBackingStore::CreateTables, since the code doesn't really support a half-way migration and it's likely cleaner to do it in one fell swoop when we know it is safe. Open to suggestions. Built on http://codereview.chromium.org/10451058/ BUG=124140 TEST= Review URL: https://chromiumcodereview.appspot.com/10451060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139706 0039d316-1c4b-4281-b951-d872f2087c98
* sync: move invalidation version prefs out of SyncPrefs into InvalidatorStorage.tim@chromium.org2012-05-301-0/+8
| | | | | | | | | | | | | | | | | | | | De-coupling so we don't add more sync < > invalidations deps while adding support for storing opaque notification state in InvalidationStateTracker. Added get/setters to InvalidationStateTracker and impl (InvalidatorStorage), but it's not wired up for use yet. Next step is to add migration code to move state from syncable::Directory to InvalidationStateTracker. Comment in invalidator_storage.h explains motivations for not moving out of sync. This patch creates the c/b/s/invalidations directory, which we can move non-profile-sync-specific chrome invalidations code to (such as BridgedSyncNotifier, and the android related part of ChromeSyncNotificationsBridge). BUG=124140 TEST=InvalidatorStorageTest, should be no functional changes Review URL: https://chromiumcodereview.appspot.com/10451058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139464 0039d316-1c4b-4281-b951-d872f2087c98
* [Sync] Fix sync_listen_notifications to use a real host resolverakalin@chromium.org2012-05-252-1/+38
| | | | | | | | | | | | | | | r138413 switched TestURLRequestContext to use a mock HostResolver by default. Clean up sync DEPS a bit. BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10435007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138947 0039d316-1c4b-4281-b951-d872f2087c98
* Revive revision 137685 and fix the DEPs file in chrome/browser/syncmunjal@chromium.org2012-05-181-8/+8
| | | | | | | BUG=124140 Review URL: https://chromiumcodereview.appspot.com/10408011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137922 0039d316-1c4b-4281-b951-d872f2087c98