summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/syncable
Commit message (Collapse)AuthorAgeFilesLines
* sync: Fix backend configuration to support sync db refresh.tim@chromium.org2010-08-112-5/+28
| | | | | | | | | | | | | Removes the has_new bit in favor of checking if initial_sync_ended for requested types, and recreates the sync db on corruption (as we used to). These together mean we refresh the sync db on corruption. Also added some defensive dchecks. To test this, I ripped out the test-only #ifdefs in SyncBackendHost so the tests use the real Initialize code path, and added a toolbox of stuff to control when we set initial sync ended bits during testing. BUG=50965 TEST=DirectoryBackingStoreTest, ProfileSyncService* tests. Review URL: http://codereview.chromium.org/3099001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55644 0039d316-1c4b-4281-b951-d872f2087c98
* Remove sync_types.h. No functions from this file are used, and some of them arebrettw@chromium.org2010-08-087-28/+26
| | | | | | | | | | | | | | | explicitly disallowed in Google code (DWORD). This implicitly brought string_util into a number of files which got ASCII conversion routimes. I replaced these with *ToUTF8 from utf_string_conversions since I am trying to delete WideToASCII. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3063021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55367 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Remove unneeded headers from base/ (part 5)thestig@chromium.org2010-08-071-1/+0
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3041049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55349 0039d316-1c4b-4281-b951-d872f2087c98
* rid of more OS_LINUX defines, to help the BSD port (work by sprewell & I)pvalchev@google.com2010-08-061-1/+1
| | | | | | Review URL: http://codereview.chromium.org/2089010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55289 0039d316-1c4b-4281-b951-d872f2087c98
* Added constants, strings, protos for app sync.akalin@chromium.org2010-08-062-1/+19
| | | | | | | | | BUG=51225 TEST=none needed Review URL: http://codereview.chromium.org/3072022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55201 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Remove unneeded headers from base/ (part 2)thestig@chromium.org2010-08-061-1/+0
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3010052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55191 0039d316-1c4b-4281-b951-d872f2087c98
* Stopgap fix for bug 48502. Stop syncing on db corruption.tim@chromium.org2010-08-023-4/+33
| | | | | | | | BUG=48502 Review URL: http://codereview.chromium.org/3075015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54516 0039d316-1c4b-4281-b951-d872f2087c98
* Convert more callers of the integer/string functions to usingbrettw@chromium.org2010-07-312-2/+3
| | | | | | | | | | string_number_conversions.h TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3013046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54454 0039d316-1c4b-4281-b951-d872f2087c98
* Move the number conversions from string_util to a new file.brettw@chromium.org2010-07-302-3/+4
| | | | | | | | | | | | | Use the base namespace in the new file. Update callers. I removed all wstring variants and also the string->number ones that ignore the return value. That encourages people to write code and forget about error handling. TEST=included unit tests BUG=none Review URL: http://codereview.chromium.org/3056029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54355 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Remove unneeded headers from app/thestig@chromium.org2010-07-291-1/+0
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/2819063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54102 0039d316-1c4b-4281-b951-d872f2087c98
* Fix leaks found by sync unit tests.nick@chromium.org2010-07-284-27/+47
| | | | | | | | | | | | | | 1. Fix EntryKernel leak if sync database load fails. 2. DirectoryBackingStore: always close the load handle. 3. DirectoryBackingStore unittests: free when .clear()ing test index 4. Fix real bad leak in Directory::PurgeEntriesWithTypeIn. BUG=50334,50335,50336,50347,50348,50349 TEST=sync_unit_tests Review URL: http://codereview.chromium.org/3026029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53994 0039d316-1c4b-4281-b951-d872f2087c98
* `#pragma once` for app, base, chrome, gfx, ipc, net, skia, viewsthakis@chromium.org2010-07-2612-0/+12
| | | | | | | | | BUG=50273 TEST=everything still builds, build is 10% faster on windows, same speed on mac/linux TBR: erg git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53716 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity issues 7028, 8452, 7061, 7070: Uninitialized members in browser/sync/*finnur@chromium.org2010-07-241-1/+3
| | | | | | | | | BUG=None (Coverity issue id listed above) TEST=None Review URL: http://codereview.chromium.org/2884036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53581 0039d316-1c4b-4281-b951-d872f2087c98
* sync: fixes crash that happens when you disable a datatype while there are ↵tim@chromium.org2010-07-211-6/+16
| | | | | | | | | | | | | | | | unsynced / unapplied items pertaining to that type. Added CHECKs to SafeToPurgeFromMemory to see if we catch any stack traces there and confirm that this is indeed happening. BUG=49278 TEST=SyncerTest.TestPurgeWhileUnsynced + TestPurgeWhileUnapplied Review URL: http://codereview.chromium.org/2806064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53256 0039d316-1c4b-4281-b951-d872f2087c98
* Fix deadlock by introducing a new transaction event.chron@chromium.org2010-07-212-2/+19
| | | | | | | | This is still going through the trybots now. Review URL: http://codereview.chromium.org/2805095 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53223 0039d316-1c4b-4281-b951-d872f2087c98
* Remove <iostream> where possible.erg@google.com2010-07-201-1/+0
| | | | | | | | | | | | | <iostream> creates a static initializer. Most people don't need <iostream> anyway--they really need <ostream> for operator<< overloads. <iostream> should *never* be included in a header file; <iosfwd> exists for that purpose. BUG=none TEST=none Review URL: http://codereview.chromium.org/3014015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53083 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Remove unused row_iterator.h file.tfarina@chromium.org2010-07-172-4/+2
| | | | | | | | | | | BUG=26443 TEST=trybots Signed-off-by: Thiago Farina <tfarina@chromium.org> Review URL: http://codereview.chromium.org/3020010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52797 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Get rid of duplicated typedef Closure definition.tfarina@chromium.org2010-07-161-2/+1
| | | | | | | | | | | | | | | The closure.h file just defines a callback type. But base/callback.h already define a callback with the same type, but with a different name. So just use the callback from base instead. BUG=26443 TEST=trybots Signed-off-by: Thiago Farina <tfarina@chromium.org> Review URL: http://codereview.chromium.org/2966009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52662 0039d316-1c4b-4281-b951-d872f2087c98
* Fix handling of undeletion within the syncer.nick@chromium.org2010-07-134-18/+22
| | | | | | | | | | | | | | | | | Accomplished by: (a) Plumbing the const CommitMessage into process_commit_response_command.cc, so that we can know the server state better (IS_DEL is no longer authoritative if ! which spilled over into a couple test expectations. (b) Relaxing the enforced invariants that version==0 implied !ServerKnows, for items with client tags. (c) Use ID renaming instead of delete/recreate to handle collisions on the unique tag. (d) Upon deletion, version number goes to 0 so that the server knows to process the item as a recreate, if it gets undeleted. Previously, the server number would get synthesized on the client by incrementing the last known version number. (e) Add unit tests for pretty much every ordering of delete/undelete I could come up with. BUG=46769 TEST=unit tests; repeatedly uninstalled/installed extensions Review URL: http://codereview.chromium.org/2844037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52209 0039d316-1c4b-4281-b951-d872f2087c98
* sync: add CleanupDisabledTypesCommand to purge data pertaining to previouslytim@chromium.org2010-07-027-45/+269
| | | | | | | | | | | | | synced data types that the user has disabled. Despite my attempt at simplifying the purge code in Directory[BackingStore], I had to go back to my first attempt with DeleteEntries (which was previously reviewed separately), with a few extra gotchas in Directory::PurgeEntriesWithTypeIn. BUG=40252 TEST=CleanupDisabledTypesCommandTest, SyncableDirectoryTest, DirectoryBackingStoreTest Review URL: http://codereview.chromium.org/2865022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51491 0039d316-1c4b-4281-b951-d872f2087c98
* Remove extended attributes. The lame broken codepath in the DBS was causingnick@chromium.org2010-06-306-382/+180
| | | | | | | | | | | several tests to fail their SaveChanges()es. Add unit test for the DBS migrations. BUG=47466 TEST=sync_unit_tests (and included new tests). Review URL: http://codereview.chromium.org/2830027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51225 0039d316-1c4b-4281-b951-d872f2087c98
* Added ModelType <-> server sync type mappings and used them.akalin@chromium.org2010-06-292-0/+91
| | | | | | | | | BUG=34645 TEST=manual Review URL: http://codereview.chromium.org/2856019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51089 0039d316-1c4b-4281-b951-d872f2087c98
* New HTML Sync Setup UI.dantasse@chromium.org2010-06-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Was reverted because of a valgrind error. This is try #2. Old flow: - type username/password. wait for Gaia auth and initial sync (with throbber) - success! or error. New flow: - type username/password. wait for Gaia auth. (with throbber) - error, or choose your datatypes. you can choose "keep everything synced", which will sync all present and future datatypes, or you can pick one by one. - wait for initial sync (with throbber) - success! or error, which brings you back to the gaia auth screen. Smaller details: - removed the Customize button from gaia_login.html; further removal of the old native Customize dialog to follow. - added a logging statement to log if you cancel from the Choose Data Types screen. - added a pref to the profile for whether you want to "keep everything synced" or choose one by one. - added a couple more strings. Not final yet, I don't think. BUG=45869 TEST=Exercise all the different paths through the login flow. Review URL: http://codereview.chromium.org/2880001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50902 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Change entry purging approach to rely on SaveChanges, which is more ↵tim@chromium.org2010-06-256-131/+91
| | | | | | | | | | | | | | | | | | consistent with the way things work in general, and specifically when things fail as the transaction boundaries are well defined. The entries will get deleted from memory after the next successful SaveChanges operation (happens every 10 seconds), and they will get deleted from disk on the next browser restart. Also clear the metadata bits that track whether there are any entries in the Directory for those types to keep it in a consistent state. BUG=40252 Review URL: http://codereview.chromium.org/2873020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50878 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r50774 as it introduces valgrind failureshclam@chromium.org2010-06-251-2/+2
| | | | | | | | | | TBR=dantasse@chromium.org TEST=Valgrind bot goes green BUG=none Review URL: http://codereview.chromium.org/2827025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50820 0039d316-1c4b-4281-b951-d872f2087c98
* New HTML Sync Setup UI! This paves the way for the Passphrase UI. (coming ↵dantasse@chromium.org2010-06-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | soon...) Old flow: - type username/password. wait for Gaia auth and initial sync (with throbber) - success! or error. New flow: - type username/password. wait for Gaia auth. (with throbber) - error, or choose your datatypes. you can choose "keep everything synced", which will sync all present and future datatypes, or you can pick one by one. - wait for initial sync (with throbber) - success! or error, which brings you back to the gaia auth screen. Smaller details: - removed the Customize button from gaia_login.html; further removal of the old native Customize dialog to follow. - added a logging statement to log if you cancel from the Choose Data Types screen. - added a pref to the profile for whether you want to "keep everything synced" or choose one by one. - added a couple more strings. Not final yet, I don't think. BUG=45869 TEST=Exercise all the different paths through the login flow. Review URL: http://codereview.chromium.org/2851012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50774 0039d316-1c4b-4281-b951-d872f2087c98
* Take 2: sync changes to support encryptionalbertb@chromium.org2010-06-233-2/+15
| | | | | | | | | | | Attempting to resubmit this change. It looks like the reason for the build break on linux was a missing dependency (nss) in the interactive_ui_test target. BUG=32410 TEST=unittests Review URL: http://codereview.chromium.org/2828021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50646 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Add method to Directory to remove all entries for a set of ModelTypes.tim@chromium.org2010-06-233-5/+145
| | | | | | | | | BUG=40252 TEST=SyncableDirectoryTest.PurgeEntriesWithTypeIn Review URL: http://codereview.chromium.org/2854018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50570 0039d316-1c4b-4281-b951-d872f2087c98
* TBR: willchanalbertb@chromium.org2010-06-223-15/+2
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50541 0039d316-1c4b-4281-b951-d872f2087c98
* DRAFT: sync_api changes to support password encryptionalbertb@chromium.org2010-06-223-2/+15
| | | | | | | | | BUG=32410 TEST=start two browsers with --enable-sync-passwords, verify that passwords do get synced between the two Review URL: http://codereview.chromium.org/2302001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50538 0039d316-1c4b-4281-b951-d872f2087c98
* Add method to delete entries from the Directory backing sqlite file by ↵tim@chromium.org2010-06-213-1/+92
| | | | | | | | | | | | | metahandle. This isn't used anywhere yet, but I plan to as part of the work for bug 40252. BUG=40252 TEST=DirectoryBackingStoreTest.DeleteEntries Review URL: http://codereview.chromium.org/2817019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50398 0039d316-1c4b-4281-b951-d872f2087c98
* Allow InitByTagLookup for WriteNodes.albertb@chromium.org2010-06-182-0/+7
| | | | | | | | | BUG=none TEST=Modified the Nigori permanent node. Review URL: http://codereview.chromium.org/2844004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50176 0039d316-1c4b-4281-b951-d872f2087c98
* Reland: Client side changes to set and get nigori specifics with passingalbertb@chromium.org2010-06-162-0/+9
| | | | | | | | | | | sync_unit_tests. BUG=none TEST=sync_unit_tests Review URL: http://codereview.chromium.org/2803005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50015 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 49967 - Client side changes to set and get nigori specifics.skerner@chromium.org2010-06-162-6/+0
| | | | | | | | | | | | BUG=none TEST=after patching in 2844004, I was able to successfully modify the Nigori permanent node. Review URL: http://codereview.chromium.org/2815009 TBR=albertb@chromium.org Review URL: http://codereview.chromium.org/2860007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49977 0039d316-1c4b-4281-b951-d872f2087c98
* Client side changes to set and get nigori specifics.albertb@chromium.org2010-06-162-0/+6
| | | | | | | | | BUG=none TEST=after patching in 2844004, I was able to successfully modify the Nigori permanent node. Review URL: http://codereview.chromium.org/2815009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49967 0039d316-1c4b-4281-b951-d872f2087c98
* Implemented initial version of extension syncing.akalin@chromium.org2010-06-141-0/+2
| | | | | | | | | BUG=32413 TEST=unit tests, trybots, manual Review URL: http://codereview.chromium.org/2752007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49712 0039d316-1c4b-4281-b951-d872f2087c98
* Replace changes_channel with an observer list.zork@chromium.org2010-06-112-9/+16
| | | | | | | | | BUG=none TEST=Run unit tests Review URL: http://codereview.chromium.org/2075012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49490 0039d316-1c4b-4281-b951-d872f2087c98
* [GTTF] Use FRIEND_TEST_ALL_PREFIXES in chrome/browser/syncphajdan.jr@chromium.org2010-06-102-11/+13
| | | | | | | | | TEST=none BUG=44549 Review URL: http://codereview.chromium.org/2658003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49381 0039d316-1c4b-4281-b951-d872f2087c98
* Add routing info and unrecoverable error info to about:sync.tim@chromium.org2010-06-092-0/+21
| | | | | | | | | | | (Needs http://codereview.chromium.org/2002012 to build). BUG=42695 TEST=manually visit about:sync Review URL: http://codereview.chromium.org/1987009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49258 0039d316-1c4b-4281-b951-d872f2087c98
* Added extensions sync-related constants, switches, and clauses.akalin@chromium.org2010-06-092-0/+9
| | | | | | | | | BUG=32413 TEST=trybots Review URL: http://codereview.chromium.org/2749005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49234 0039d316-1c4b-4281-b951-d872f2087c98
* Changed syncable::PASSWORD to syncable::PASSWORDS for consistencyakalin@chromium.org2010-06-092-3/+3
| | | | | | | | | | | with other constants. BUG=none TEST=trybots Review URL: http://codereview.chromium.org/2770003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49231 0039d316-1c4b-4281-b951-d872f2087c98
* Wrap Sqlite utils functions into a sqlite_utils namespace.tfarina@chromium.org2010-06-031-2/+2
| | | | | | | | | | | Note: this was a TODO. BUG=None TEST=compiles Review URL: http://codereview.chromium.org/2410002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48883 0039d316-1c4b-4281-b951-d872f2087c98
* Enable warning 4389 as an error on windows builds. This will make mbelshe@chromium.org2010-05-271-5/+6
| | | | | | | | | | | | windows builds more similar to linux/mac, which already treat signed/ unsigned equality comparisons as warnings (and hence errors). BUG=44471 TEST=none Review URL: http://codereview.chromium.org/2222002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48395 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Another dependency the bbot missed!!!"rafaelw@chromium.org2010-05-261-6/+5
| | | | | | | | | | | | | | | | | | This reverts commit 161f7fd3bdd425167af9fe26fdc5373a2ff44c98. Revert "Missed a file as part of checkin for r48186" This reverts commit cff86beba5938209393a6c3bccced62a7f3ff36b. Revert "Enable warning 4389 as an error on windows builds. This will make" This reverts commit c78936bcfc65b98edf288191d927a495b0364621. TBR=mbelshe Review URL: http://codereview.chromium.org/2253001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48238 0039d316-1c4b-4281-b951-d872f2087c98
* Enable warning 4389 as an error on windows builds. This will makembelshe@chromium.org2010-05-251-5/+6
| | | | | | | | | | | | windows builds more similar to linux/mac, which already treat signed/ unsigned equality comparisons as warnings (and hence errors). BUG=44471 TEST=none Review URL: http://codereview.chromium.org/2081007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48186 0039d316-1c4b-4281-b951-d872f2087c98
* Adding sync support for Passwordszork@chromium.org2010-05-191-0/+1
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/1851004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47686 0039d316-1c4b-4281-b951-d872f2087c98
* sync: add default constructor to EntryKernel to avoid UMR of dirty_ bit.tim@chromium.org2010-05-101-0/+8
| | | | | | | | | | | Also add comments as requested by chron's post-submit code review. BUG=43613 TEST=SyncableDirectoryTest Review URL: http://codereview.chromium.org/2013011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46840 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land the protocol extension for syncing passwords patch.albertb@chromium.org2010-05-072-0/+9
| | | | | | | | | BUG=34176 TEST=none Review URL: http://codereview.chromium.org/2024006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46747 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Protocol extension for syncing passwords."albertb@chromium.org2010-05-072-9/+0
| | | | | | | | | | This reverts commit 4ab711db8ace2106fea6a95e12d2da6fbe4f78f7. TBR=tommi Review URL: http://codereview.chromium.org/2014004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46723 0039d316-1c4b-4281-b951-d872f2087c98
* Protocol extension for syncing passwords.albertb@chromium.org2010-05-072-0/+9
| | | | | | | | | BUG=34176 TEST=none Review URL: http://codereview.chromium.org/1794009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46720 0039d316-1c4b-4281-b951-d872f2087c98