summaryrefslogtreecommitdiffstats
path: root/chrome/test/sync
Commit message (Collapse)AuthorAgeFilesLines
* svn prop fixes. Applied to all files not in third_party.pkasting@chromium.org2010-03-099-0/+0
| | | | | | | | | | | | * Removed eol-style, executable and mergeinfo from BMP/GIF/ICO/JPEG files, and set correct mime-type. * Removed executable and mergeinfo from .c/.cc/.cpp/.h/.m/.mm and .gyp files, and set eol-style to LF. TBR=evanm BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40991 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for the Update-Client-Auth header to sync. Add a mutex to the ↵chron@google.com2010-02-172-2/+6
| | | | | | | | | | | auth token in ServerConnectionManager. TEST=manually tested using fiddler2 script. BUG=35321 Review URL: http://codereview.chromium.org/605010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39259 0039d316-1c4b-4281-b951-d872f2087c98
* For sync, make ProcessCommitResponseCommand handle commit entries one ↵tim@chromium.org2010-02-161-2/+20
| | | | | | | | | | | | | | | ModelSafeGroup at a time. Enforce ModelSafeGroup restrictions in the StatusController by DCHECKing if out-of-bounds. Move OrderedCommitSet to its own file. Removed some unused error counters and ResetTransientState calls that were useless. BUG=31911 TEST=ProcessCommitResponseTest, OrderedCommitSetTest Review URL: http://codereview.chromium.org/604045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39139 0039d316-1c4b-4281-b951-d872f2087c98
* Create preferences DTC and wire it into the profile sync factory.skrul@chromium.org2010-02-111-0/+1
| | | | | | | | Also includes a small valgrind error fix. Review URL: http://codereview.chromium.org/598046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38815 0039d316-1c4b-4281-b951-d872f2087c98
* Hook up client side of per-datatype GetUpdates.nick@chromium.org2010-02-113-8/+133
| | | | | | | | | | | Which datatypes are fetched is dictated by the ModelSafeRoutingInfo. We change the semantic of the ModelSafeRoutingInfo so that datatypes which should not be synced are not in the map. We will do GetUpdates for GROUP_PASSIVE datatypes. BUG=29905 TEST=included unit tests Review URL: http://codereview.chromium.org/594024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38726 0039d316-1c4b-4281-b951-d872f2087c98
* Add missing newline to fix build.tim@chromium.org2010-02-091-1/+1
| | | | | | | | TBR=nick Review URL: http://codereview.chromium.org/594017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38521 0039d316-1c4b-4281-b951-d872f2087c98
* Added UNIQUE_CLIENT_TAG to sync engine. Added some syncapi unit tests. Added ↵chron@google.com2010-02-094-5/+12
| | | | | | | | | | | | | | new index to syncable. Added new DB col to syncable. Renamed singleton tag to UNIQUE_CLIENT_TAG. Added syncapi layer support for unique client tags. Hooked up wire protocol to use this index. Downintegrate of sync.proto from trunk. TEST=unit tests included BUG=32636 Review URL: http://codereview.chromium.org/558015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38518 0039d316-1c4b-4281-b951-d872f2087c98
* Make SyncerThread stop polling if an AUTH_INVALID response is parsed.tim@chromium.org2010-02-092-19/+48
| | | | | | | | | | BUG=34396 TEST=SyncerTHreadWithSyncerTest.AuthInvalid Review URL: http://codereview.chromium.org/596007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38513 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a bug where positions inside of a newly-committed folder would benick@chromium.org2010-02-091-0/+80
| | | | | | | | | | | | | | | | | | | reversed if the children of the folder weren't committed in the same batch as the folder. Refactor ApplyUpdatesCommandTest, pulling out functionality that would be useful for any SyncerCommand test, into syncer_command_test.h. Add a test case for ProcessCommitResponseCommand using the new SyncerCommandTest framework. Add a test for the bug. BUG=33081 TEST=sync_unit_tests. Also, manual testing, using the reduced repro instructions described in comment #26 of the bug. Review URL: http://codereview.chromium.org/572021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38472 0039d316-1c4b-4281-b951-d872f2087c98
* Enable valgrind for sync tests (and fix valgrind errors)skrul@chromium.org2010-01-271-1/+1
| | | | | | | | BUG=32871 Review URL: http://codereview.chromium.org/548156 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37262 0039d316-1c4b-4281-b951-d872f2087c98
* In the sync database, use protobuf-based storage. Drop the oldnick@chromium.org2010-01-272-11/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | bookmark-only columns. Add getters and setters for BookmarkSpecifics to syncapi as well as syncable entries. Make the datatype be a required property when creating a syncapi node. Add a datatype for the 'google chrome' top level folder. Add database migrations from version 67 to the new schema. Add infrastructure to support migrations generically. Add unit tests for the migrations. Pull a new version of the protobuf library to pick up a fix for a bug that this change exposed (I upstreamed the fix). Fix some example code in the sql helpers so that it would actually compile. BUG=29899,30041 TEST=New unit tests for migrations: unit tests are based on actual database dumps. Additionally, I manually tested 2-client sync using combos of old-protocol servers, new-protocol servers, and initial database versions v67, v68, and v0 (new client). I manually verified that add/edit/delete works in these combination cases. Afterwards I verified (by inspecting the sync databases) that the ModelTypes are consistent across the various migration/protocol paths. Review URL: http://codereview.chromium.org/554066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37253 0039d316-1c4b-4281-b951-d872f2087c98
* Final part of PathString cleanup.munjal@chromium.org2009-11-243-7/+11
| | | | | | | | | BUG=26342 TEST+exist Review URL: http://codereview.chromium.org/429003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32894 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unique naming from syncer! This reduces the complexity. Modify the ↵chron@google.com2009-11-204-13/+106
| | | | | | | | | | | | | | | | | | | | | index to store things with parent id and metahandle instead of parent id and name. Add a template function for extracting name from proto buffers. Refactor some unit tests to work without unique naming. Remove path calls since they make no sense without unique names. Remove find by parentID and names. Remove unique name resolution from conflict resolver. Remove syncable name class. TEST=included unit tests Review URL: http://codereview.chromium.org/371029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32583 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes almost all of the rest of lint errors in the chrome/ directory (minus ↵erg@google.com2009-11-131-1/+1
| | | | | | | | the really hard ones which will need actual review instead of rubber-stamping.) Review URL: http://codereview.chromium.org/386026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31932 0039d316-1c4b-4281-b951-d872f2087c98
* Part 1 of removing PathSTring. I scrubbed files that are notmunjal@chromium.org2009-11-134-9/+12
| | | | | | | | in chron's CL to avoid merge. Review URL: http://codereview.chromium.org/393011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31930 0039d316-1c4b-4281-b951-d872f2087c98
* A large number of style nits in preparation for turning on automated cpplint.py.erg@google.com2009-11-111-2/+4
| | | | | | Review URL: http://codereview.chromium.org/385023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31669 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up the strings for sync code:munjal@chromium.org2009-11-043-10/+8
| | | | | | | | | | | | | | | | - Use FilePath for real file paths. - Use std::string for PathString on Windows as well TODO in a separate CL: - Get rid of PathString typedef completely and directly use std::string everywhere. - Use wchar_t in syncapi.h/.cc and get rid of sync_char16. TEST=Existing tests are sufficient since this CL does a lot of code refactoring. BUG=26342 Review URL: http://codereview.chromium.org/340055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30970 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the browser_sync flag.zork@chromium.org2009-10-271-4/+0
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/337034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30272 0039d316-1c4b-4281-b951-d872f2087c98
* Hook up "remaining changes" to sync client. Remove "latest timestamp".chron@chromium.org2009-10-232-5/+4
| | | | | | | | TEST=manually tested BUG=19993 Review URL: http://codereview.chromium.org/295052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29930 0039d316-1c4b-4281-b951-d872f2087c98
* Fix ProfileSyncService unit test.nick@chromium.org2009-10-171-0/+69
| | | | | | | | | | | | | | | | | | | | | Create TestHttpBridge for use by ProfileSyncServiceUnittest, so it doesn't crash. DoInitialize has been changed to take a HttpPostProviderFactory before the core initialization. The HttpBridge is now created on the UI thread instead of the core thread. Create fake tagged nodes in the order that they are requested. Make the request order consistent and in visual order since this is the most natural way to request them. TEST=Ran the affected unit tests on Windows, tested basic sync functionality with two concurrent browsers. BUG=25021 Review URL: http://codereview.chromium.org/292008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29368 0039d316-1c4b-4281-b951-d872f2087c98
* Made sync code build and pass unit tests on OS X.akalin@chromium.org2009-10-162-8/+3
| | | | | | | | | | | | | | | | | | | | Major changes: - Moved sync_setup_{flow,wizard} to sync directory. - Made browser_with_test_window_test compile on non-Windows platform. - Moved localized contents font util functions to app/. BUG=23073 TEST=trybot Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=29253 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=29255 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=29258 Review URL: http://codereview.chromium.org/279004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29263 0039d316-1c4b-4281-b951-d872f2087c98
* Reverted 29258.akalin@chromium.org2009-10-162-3/+8
| | | | | | TBR: nick@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29259 0039d316-1c4b-4281-b951-d872f2087c98
* Made sync code build and pass unit tests on OS X.akalin@chromium.org2009-10-162-8/+3
| | | | | | | | | | | | | | | | | | Major changes: - Moved sync_setup_{flow,wizard} to sync directory. - Made browser_with_test_window_test compile on non-Windows platform. - Moved localized contents font util functions to app/. BUG=23073 TEST=trybot Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=29253 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=29255 Review URL: http://codereview.chromium.org/279004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29258 0039d316-1c4b-4281-b951-d872f2087c98
* Reverted 29255.akalin@chromium.org2009-10-162-3/+8
| | | | | | TBR: nick@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29256 0039d316-1c4b-4281-b951-d872f2087c98
* Made sync code build and pass unit tests on OS X.akalin@chromium.org2009-10-162-8/+3
| | | | | | | | | | | | | | | | Major changes: - Moved sync_setup_{flow,wizard} to sync directory. - Made browser_with_test_window_test compile on non-Windows platform. - Moved localized contents font util functions to app/. BUG=23073 TEST=trybot Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=29253 Review URL: http://codereview.chromium.org/279004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29255 0039d316-1c4b-4281-b951-d872f2087c98
* Reverted 29253.akalin@chromium.org2009-10-162-3/+8
| | | | | | TBR: nick@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29254 0039d316-1c4b-4281-b951-d872f2087c98
* Made sync code build and pass unit tests on OS X.akalin@chromium.org2009-10-162-8/+3
| | | | | | | | | | | | | | Major changes: - Moved sync_setup_{flow,wizard} to sync directory. - Made browser_with_test_window_test compile on non-Windows platform. - Moved localized contents font util functions to app/. BUG=23073 TEST=trybot Review URL: http://codereview.chromium.org/279004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29253 0039d316-1c4b-4281-b951-d872f2087c98
* TBR: nick@chromium.orgakalin@chromium.org2009-10-161-0/+6
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29240 0039d316-1c4b-4281-b951-d872f2087c98
* Made sync code build and pass unit tests on OS X.akalin@chromium.org2009-10-161-6/+0
| | | | | | | | | | | | | | Major changes: - Moved sync_setup_{flow,wizard} to sync directory. - Made browser_with_test_window_test compile on non-Windows platform. - Moved localized contents font util functions to app/. BUG=23073 TEST=trybot Review URL: http://codereview.chromium.org/279004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29239 0039d316-1c4b-4281-b951-d872f2087c98
* Hook up ClientToServerResponse::THROTTLED to the client sync loop.tim@chromium.org2009-10-162-0/+46
| | | | | | | | TEST=Added SyncerThreadWithSyncerTest.Throttling Review URL: http://codereview.chromium.org/269101 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29236 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed some more Google Sync mac build compile errors.akalin@chromium.org2009-10-131-2/+10
| | | | | | Review URL: http://codereview.chromium.org/271043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28901 0039d316-1c4b-4281-b951-d872f2087c98
* Sync: Remove pthreads from auth_watcher.tim@chromium.org2009-10-074-6/+86
| | | | | | | | BUG=19895 TEST=AuthWatcherTest Review URL: http://codereview.chromium.org/246098 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28352 0039d316-1c4b-4281-b951-d872f2087c98
* Update sync unit tests to build on linuxzork@chromium.org2009-10-071-1/+1
| | | | | | Review URL: http://codereview.chromium.org/218014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28349 0039d316-1c4b-4281-b951-d872f2087c98
* Second attempt at the new syncer thread impl, now with less crashes!tim@chromium.org2009-09-254-9/+64
| | | | | | | | | | | | | | | | | Previous one at http://codereview.chromium.org/214033. I had local edits that resulted in initializing the CommandLine for syncapi, but didn't have them as part of the patch, so this was causing a crash whenever SyncerThreadFactory::Create was called. The only diff here is the call to CommandLine::Init in syncapi.cc. This effectively means you can't change the syncer thread impl on linux (we init an empty command line there), but this is OK. Once we link statically we won't need to do this. TEST=ProfileSyncServiceTest, SyncerThreadTest, SyncerThreadWithSyncerTest Review URL: http://codereview.chromium.org/250001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27281 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 27117.davemoore@chromium.org2009-09-244-64/+9
| | | | | | Review URL: http://codereview.chromium.org/235010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27124 0039d316-1c4b-4281-b951-d872f2087c98
* Use chrome/base synchronization primitives and threads instead oftim@chromium.org2009-09-244-9/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | pthreads in SyncerThread. The old pthread impl can be used by specifying --syncer-thread-pthreads for comparison until we settle fully on the final impl (I have a MessageLoop-based impl in progress). The default SyncerThread is as close to the pthreads-impl semantics as I could get, with one exception: it does not offer a time-out when calling Stop(), because it greatly simplifies the implementation. I first implemented it *with* the timeout, and for sake of experimentation while this is in shuffle I am checking it in as SyncerThreadTimedStop, available by using --syncer-thread-timed-stop. I'm not sure which we want ultimately, but it's useful to have around when building the MessageLoop based impl. I had to refactor the interface slightly to allow multiple implementations, I think it will be quite useful while working on the MessageLoop impl. Added several tests to SyncerThreadUnittest, which all impls now pass ( just pass the command line flag to try each out). TEST=SyncerThreadTest, SyncerThreadWithSyncerTest, integration tests Review URL: http://codereview.chromium.org/214033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27117 0039d316-1c4b-4281-b951-d872f2087c98
* Build the sync unit tests:nick@chromium.org2009-09-161-1/+1
| | | | | | | | | | | | | | | | | | | - Remove old main(argc, argv) from syncable_unittest. - Since the old notifier target had only one unittest, merge it with the syncer tests. - Remove listener_unittest.cc entirely. - Don't compile natserver_main.cc, which has another main() - Use a test main from the test_support_unit library. This has the downside of pulling in a lot of deps we don't need, but it gives us a run_all_unittests.cc. - Fix a few compile errors in test code. TEST=unit tests pass BUG=none Review URL: http://codereview.chromium.org/205021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26358 0039d316-1c4b-4281-b951-d872f2087c98
* Made some style fixes in the remaining code under chrom/browser/sync and ↵idana@chromium.org2009-09-147-27/+25
| | | | | | | | under chrome/test/sync. Review URL: http://codereview.chromium.org/203043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26126 0039d316-1c4b-4281-b951-d872f2087c98
* Initial commit of sync engine code to browser/sync.nick@chromium.org2009-09-108-0/+1155
The code is not built on any platform yet. That will arrive as a subsequent checkin. This is an implementation of the interface exposed earlier through syncapi.h. It is the client side of a sync protocol that lets users sync their browser data (currently, just bookmarks) with their Google Account. Table of contents: browser/sync/ protocol - The protocol definition, and other definitions necessary to connect to the service. syncable/ - defines a data model for syncable objects, and provides a sqlite-based backing store for this model. engine/ - includes the core sync logic, including commiting changes to the server, downloading changes from the server, resolving conflicts, other parts of the sync algorithm. engine/net - parts of the sync engine focused on the business of talking to the server. Some of this is binds a generic "server connection" interface to a concrete implementation provided by Chromium. notifier - the part of the syncer focused on the business of sending and receiving xmpp notifications. Notifications are used instead of polling to achieve very low latency change propagation. util - not necessarily sync specific utility code. Much of this is scaffolding which should either be replaced by, or merged with, the utility code in base/. BUG=none TEST=this code includes its own suite of unit tests. Review URL: http://codereview.chromium.org/194065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25850 0039d316-1c4b-4281-b951-d872f2087c98