summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync
Commit message (Collapse)AuthorAgeFilesLines
* Make it clear what last_sync_timestamp actually tracks. Updatenick@chromium.org2010-03-2421-130/+210
| | | | | | | | | | | | | | | | last_sync_timestamp from the new_timestamp only, never from per-entry timestamps. Use what the server sends us to know whether or not there are more updates to fetch. Eliminate some unnecessarily complicated logic having to do with the # of updates returned -- that's always a red herring; with server-side filtering, it is indeed possible for 0 updates to be returned along with a new timestamp. BUG=37373 TEST=manual testing of 2 browser sync; unit tests. Review URL: http://codereview.chromium.org/1161006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42413 0039d316-1c4b-4281-b951-d872f2087c98
* This is basically a rewrite of the DataTypeManager to support dynamic data ↵skrul@chromium.org2010-03-238-283/+645
| | | | | | | | | | type configuration. DTM::Start() has been replaced with DTM::Configure(). Note that the callback is also gone, replaced with notification service style notifications to tell listeners that configuration has started or finished. I also added some stuff to prepare for adding the "initial download" step for new datatype into the configure process. Review URL: http://codereview.chromium.org/1128012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42384 0039d316-1c4b-4281-b951-d872f2087c98
* Fix bustage by adding friend decl.tim@chromium.org2010-03-231-1/+1
| | | | | | | TBR=nick Review URL: http://codereview.chromium.org/1192001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42371 0039d316-1c4b-4281-b951-d872f2087c98
* Disable SyncerThreadWithSyncerTest.Pause. It's timing out, so I can't use ↵tim@chromium.org2010-03-231-1/+2
| | | | | | | | | | | FLAKY :( TBR=skrul BUG=39070 Review URL: http://codereview.chromium.org/1189001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42369 0039d316-1c4b-4281-b951-d872f2087c98
* Removed win32socketserver and its use in mediator_thread_impl.cc.akalin@chromium.org2010-03-231-25/+0
| | | | | | | | | BUG=38595 TEST=trybots, manual Review URL: http://codereview.chromium.org/1110007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42313 0039d316-1c4b-4281-b951-d872f2087c98
* Move app/gfx/canvas and app/gfx/font to gfx/.ben@chromium.org2010-03-231-1/+1
| | | | | | | | | | TBR=darin BUG=none TEST=none Review URL: http://codereview.chromium.org/1132006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42312 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor Directory/Directory::Kernel to eliminate some duplicate variable ↵nick@chromium.org2010-03-222-51/+49
| | | | | | | | | | | | | declarations. Add a PersistedKernelInfo member to the directory kernel, rather than having parallel members. BUG=37331 TEST=unit tests. Review URL: http://codereview.chromium.org/1078004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42265 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate a race between the syncerthread delivering PAUSEDnick@chromium.org2010-03-221-11/+11
| | | | | | | | notifications and the syncmanager subscribing to them. Review URL: http://codereview.chromium.org/1096006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42257 0039d316-1c4b-4281-b951-d872f2087c98
* Pass the raw history backend pointer to the gmock action rather than the refptr.skrul@chromium.org2010-03-221-1/+1
| | | | | | Review URL: http://codereview.chromium.org/1072009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42230 0039d316-1c4b-4281-b951-d872f2087c98
* Improve the integration test harness by using the max_local_timestamptim@chromium.org2010-03-194-8/+44
| | | | | | | | | | | from the sync engine rather than waiting for "a couple syncs" to happen before declaring sync "done". BUG=37351 Review URL: http://codereview.chromium.org/1042008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42134 0039d316-1c4b-4281-b951-d872f2087c98
* Combine similar code from sync unit tests and add additional unit tests for ↵zork@chromium.org2010-03-194-204/+233
| | | | | | | | | | | typed url syncing. BUG=none TEST=run unit tests Review URL: http://codereview.chromium.org/1124002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42048 0039d316-1c4b-4281-b951-d872f2087c98
* Move image codec stuff to toplevel gfx.ben@chromium.org2010-03-181-1/+1
| | | | | | | | | TBR=darin BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41911 0039d316-1c4b-4281-b951-d872f2087c98
* Update sync to support syncing of typed urlszork@chromium.org2010-03-1826-5/+2000
| | | | | | Review URL: http://codereview.chromium.org/896001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41901 0039d316-1c4b-4281-b951-d872f2087c98
* Pause the sync thread while starting data types.skrul@chromium.org2010-03-1719-51/+339
| | | | | | | | | | | | | A few things to note: - I ended the plubming (it's-a me, mario!) at the SyncBackendHost (the PSS does not know about pausing). The SyncBackendHost now has RequestPause/RequestResume methods. The notifications that are sent when pause and resume is complete are dispatched to the notification service by the SyncBackendHost. - Calls to SHB::Request(Pause|Resume) go directly to the similar named methods on the SyncerThread. This is unlike other methods on the SHB which are usually dispatched to the "core" thread before calling deeper into the onion. I did this to avoid having to deal with callbacks to carry the result value of pause/resume (since the methods can fail and return false). If this is a problem I can change the way it works. - There is a little trickery regarding the integration unit tests since we typically use a specially initialized SBH for these tests, and the syncer thread does not really run for these tests. Since the thread is not running, pause and resume won't work properly. To get around this, the DataTypeManagerImpl in these tests is constructed with a mock SBH that will respond properly to pause and resume requests. BUG=37154,37553 Review URL: http://codereview.chromium.org/1063002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41883 0039d316-1c4b-4281-b951-d872f2087c98
* Removed auth_task.* and talk_auth_task.* (dead code)akalin@chromium.org2010-03-1721-1435/+21
| | | | | | | | | | | | | | | Removed GaiaAuth class. Gtalk login will now fail immediately instead of trying (in vain) to gaia-auth. Removed now-unneeded parameters. BUG=38034 TEST=manual with and without --invalidate-sync-xmpp-login Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=41790 Review URL: http://codereview.chromium.org/885008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41865 0039d316-1c4b-4281-b951-d872f2087c98
* Change observer expectationsskrul@chromium.org2010-03-172-24/+44
| | | | | | | | This should prevent some test flakyness we saw on vista. Review URL: http://codereview.chromium.org/977003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41857 0039d316-1c4b-4281-b951-d872f2087c98
* Add a lock to read |state_| in UIModelWorker::DoWorkAndWait. We don'ttim@chromium.org2010-03-172-8/+8
| | | | | | | | | | | | | | | strictly need to acquire the lock here because this can only get called while !syncapi_has_shutdown_ and STOPPED could only get set after that bool is false (and that bool is protected by locks), the purpose of this DCHECK/return is for catching developer error in extraordinary cases, so in a way, adding ANNOTATE_UNPROTECTED_READ would seem hypocritical. BUG=32892 TEST=UIModelWorkerTest Review URL: http://codereview.chromium.org/965002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41840 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 41790 - Removed auth_task.* and talk_auth_task.* (dead code) because ↵hbono@google.com2010-03-1721-18/+1436
| | | | | | | | | | | | | | | | | | Windows XP doesn't have inet_pton and it crashes XP bots. Removed GaiaAuth class. Gtalk login will now fail immediately instead of trying (in vain) to gaiaauth. Removed nowunneeded parameters. BUG=38034 TEST=manual with and without invalidatesyncxmpplogin Review URL: http://codereview.chromium.org/885008 TBR=akalin@chromium.org Review URL: http://codereview.chromium.org/983005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41808 0039d316-1c4b-4281-b951-d872f2087c98
* Removed auth_task.* and talk_auth_task.* (dead code)akalin@chromium.org2010-03-1721-1436/+18
| | | | | | | | | | | | | Removed GaiaAuth class. Gtalk login will now fail immediately instead of trying (in vain) to gaia-auth. Removed now-unneeded parameters. BUG=38034 TEST=manual with and without --invalidate-sync-xmpp-login Review URL: http://codereview.chromium.org/885008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41790 0039d316-1c4b-4281-b951-d872f2087c98
* Split up PreXmppAuth and SaslHandler.akalin@chromium.org2010-03-165-72/+55
| | | | | | | | | | | Created a X-GOOGLE-TOKEN-only SaslHandler class for use by sync. BUG=38034 TEST=manual Review URL: http://codereview.chromium.org/904006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41761 0039d316-1c4b-4281-b951-d872f2087c98
* Change MediatorThreadImpl::Run to process messages forever and periodically ↵tim@chromium.org2010-03-163-17/+38
| | | | | | | | | | | | | call PumpAuxiliaryLoops to run the 3 (!!:(!!) other loops associated with this thread. There was previously a race where quit would be called and set a cancellation flag before the posted task would get executed. BUG=37771 Review URL: http://codereview.chromium.org/984001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41724 0039d316-1c4b-4281-b951-d872f2087c98
* Generalize the net module's LoadLog facility from a passive container, to an ↵eroman@chromium.org2010-03-162-3/+3
| | | | | | | | | | | | | | | | event stream (NetLog). This makes it possible to associate a single NetLog with a URLRequestContext, and then attach observers to that log to watch the stream of events. This changelist attempts to do the most direct translation, so there will be subsequent iterations to clean up. The user-visible behavior should remain unchanged. BUG=37421 Review URL: http://codereview.chromium.org/848006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41689 0039d316-1c4b-4281-b951-d872f2087c98
* Implement SyncerThread::RequestPause and SyncerThread::RequestResumeskrul@chromium.org2010-03-155-2/+151
| | | | | | | | Basic functionality with unit test. More plumbing later :) Review URL: http://codereview.chromium.org/847004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41628 0039d316-1c4b-4281-b951-d872f2087c98
* Added switch to invalidate the sync xmpp auth token for testing.akalin@chromium.org2010-03-129-10/+40
| | | | | | | | | BUG=none TEST=manual Review URL: http://codereview.chromium.org/883003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41506 0039d316-1c4b-4281-b951-d872f2087c98
* Additional unit tests for autofillskrul@chromium.org2010-03-122-4/+140
| | | | | | | | Unit tests for the autofill change processor. This includes changes from the chrome side -- a user adding, updating, and removing an autofill entry. Also tests handing of errors during change processing. Includes a bug fix for autofill remove. Review URL: http://codereview.chromium.org/837005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41439 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor synchronous error handlingskrul@chromium.org2010-03-1119-296/+262
| | | | | | | | | | This is the first of hopefully only two changes to improve our error handling situation. This change changes the way we use OnUnrecoverableError -- previously this was called whenever there was some kind of error in the MA or CP, but now it is only used for asynchronous errors. It has been removed from synchronous methods in favor of boolean return values to report errors. This simplifies some of the error handling. The next step is to make sure asynchronous usage of OnUnrecoverableError actually works as it should. Review URL: http://codereview.chromium.org/778002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41278 0039d316-1c4b-4281-b951-d872f2087c98
* Ripped out talk/p2p directory from third_party/libjingle.akalin@chromium.org2010-03-105-5/+5
| | | | | | | | | | | Fixed a few compile errors as a result. BUG=none TEST=trybots Review URL: http://codereview.chromium.org/790002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41210 0039d316-1c4b-4281-b951-d872f2087c98
* More code cleanups found by -Wextra.evan@chromium.org2010-03-092-2/+2
| | | | | | | | (I'm still waiting on a v8 change to turn this on for the whole codebase...) Review URL: http://codereview.chromium.org/746001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41080 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 40521 - Fix attempt for bug 34158. Reset the TalkMediator after ↵tim@chromium.org2010-03-091-4/+1
| | | | | | | | | | | | | | | | | | | | calling Logout to ensure it is destroyed from the core thread. This ensures the task to destroy the GaiaAuth object is run on the core thread and not the UI thread. Fred and I debugged this together and actually saw a second crash appear to result from this change, but then we did a clean build and were unable to repro that crash, so I think this as a net win at the moment. BUG=34158,37771 Review URL: http://codereview.chromium.org/660437 TBR=akalin@chromium.org Review URL: http://codereview.chromium.org/738002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41071 0039d316-1c4b-4281-b951-d872f2087c98
* BSD ifdefs, etc. necessary for chrome/pvalchev@google.com2010-03-091-0/+4
| | | | | | Review URL: http://codereview.chromium.org/656009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41067 0039d316-1c4b-4281-b951-d872f2087c98
* Speculative fix for bug 37709. Don't use a MutableEntry (and hence add ↵tim@chromium.org2010-03-092-4/+5
| | | | | | | | | | something to the transaction's originals_ array) in apply updates until we know it's a safe type. BUG=37709,36822 Review URL: http://codereview.chromium.org/705001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41065 0039d316-1c4b-4281-b951-d872f2087c98
* Make VerifyUpdatesCommand a ModelChanging variant for now as we can endtim@chromium.org2010-03-094-6/+119
| | | | | | | | | | | | | | | | up in AttemptReuniteLostCommitResponse, change IDs, and wind up trying to move a bookmark as a result from the wrong thread. I haven't seen a case where it's actually _moving_, but we still call into the BookmarkModel. It's a no-op call except for a threading assertion. Add check to BookmarkChangeProcessor that we're on the UI thread. BUG=37723 TEST=VerifyUpdatesCommandUnittest (added) Review URL: http://codereview.chromium.org/689001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41064 0039d316-1c4b-4281-b951-d872f2087c98
* Add tests to the ProfileSyncServiceAutofillTest for association merge.skrul@chromium.org2010-03-095-48/+148
| | | | | | | | This include two bug fixes for the AutofillModelAssociator -- there was a call to OnUnrecoverableError on the PSS which should have been error_handler, plus the sync node's timestamps were got getting written when an association merge took place. Review URL: http://codereview.chromium.org/671022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41050 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unused persist code.skrul@chromium.org2010-03-094-119/+3
| | | | | | Review URL: http://codereview.chromium.org/679001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41034 0039d316-1c4b-4281-b951-d872f2087c98
* svn prop fixes. Applied to all files not in third_party.pkasting@chromium.org2010-03-0954-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
* BSD port: Another chunk of chrome/ ifdef changespvalchev@google.com2010-03-091-4/+4
| | | | | | Review URL: http://codereview.chromium.org/652186 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40974 0039d316-1c4b-4281-b951-d872f2087c98
* chrome 2: string_util.h -> utf_string_conversions.h fix.jhawkins@chromium.org2010-03-084-5/+10
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/672007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40945 0039d316-1c4b-4281-b951-d872f2087c98
* Fix KeyToTag and add unit testskrul@chromium.org2010-03-082-2/+29
| | | | | | | | BUG=37559 Review URL: http://codereview.chromium.org/669211 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40908 0039d316-1c4b-4281-b951-d872f2087c98
* Add unit test for the "aborted by shutdown" case.skrul@chromium.org2010-03-081-0/+13
| | | | | | | | | | This unit test would crash the code that is on the current dev branch, however with the addition of the DataTypeManager this is no longer a problem on trunk. In the dev version, the PSS would try to try to stop a data type in mid startp causing it to abort, which then rasies and error and tries to stop the same data type again. With the DTM, it knows how to handle aborting a data type startup at shutdown by not letting an aborted stop raise an error. BUG=37243 Review URL: http://codereview.chromium.org/668183 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40904 0039d316-1c4b-4281-b951-d872f2087c98
* Next part of removing the dependency of chrome/common on chrome/browserphajdan.jr@chromium.org2010-03-061-0/+1
| | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/669184 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40834 0039d316-1c4b-4281-b951-d872f2087c98
* Use a common call to WriteAutofill in AutofillModelAssociator, add a properzork@google.com2010-03-053-44/+41
| | | | | | | | | | | update to the sync model on model association. BUG=none TEST=none Review URL: http://codereview.chromium.org/661337 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40781 0039d316-1c4b-4281-b951-d872f2087c98
* Remove DeleteOnIOThread from Datatype controller to fix Valgrind and remove ↵zork@chromium.org2010-03-051-6/+0
| | | | | | | | | | | the suppression BUG=37168 TEST=Run Valgrind Review URL: http://codereview.chromium.org/661428 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40774 0039d316-1c4b-4281-b951-d872f2087c98
* Under Chromium OS, keep track of whether sync auth has been bootstrappedalbertb@chromium.org2010-03-052-3/+24
| | | | | | | | | | | already to avoid re-enabling sync everytime the machine boots. BUG=37164 TEST=unit test Review URL: http://codereview.chromium.org/669099 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40760 0039d316-1c4b-4281-b951-d872f2087c98
* Fix one valgrind bug.chron@google.com2010-03-041-1/+2
| | | | | | Review URL: http://codereview.chromium.org/668024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40584 0039d316-1c4b-4281-b951-d872f2087c98
* Improve autofill unit testskrul@chromium.org2010-03-035-61/+61
| | | | | | | | With chron's help, I was able to get rid of the whole TestModelAssocator thing and use the low level syncapi directly to create the server tagged autofill node before model association starts. Because of this, I was able to revert to the original AutofillModelAssociator::AssociateModels() code that zork had and it now works fine in a test. Review URL: http://codereview.chromium.org/661410 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40524 0039d316-1c4b-4281-b951-d872f2087c98
* Fix attempt for bug 34158. Reset the TalkMediator after calling Logout to ↵tim@chromium.org2010-03-031-1/+4
| | | | | | | | | | | | | | | | | ensure it is destroyed from the core thread. This ensures the task to destroy the GaiaAuth object is run on the core thread and not the UI thread. Fred and I debugged this together and actually saw a second crash appear to result from this change, but then we did a clean build and were unable to repro that crash, so I think this as a net win at the moment. BUG=34158 Review URL: http://codereview.chromium.org/660437 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40521 0039d316-1c4b-4281-b951-d872f2087c98
* Fix autofill test hangskrul@chromium.org2010-03-031-9/+35
| | | | | | | | | | The common TestProfileSyncService did some unexpected things with message loops, so use a custom version for this test. Hopfully in a more testable future we won't need magic testing classes such as this. BUG=37244 Review URL: http://codereview.chromium.org/661423 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40489 0039d316-1c4b-4281-b951-d872f2087c98
* Make DTCs implement the UnrecoverableErrorHandler interface so they can bealbertb@chromium.org2010-03-0323-89/+233
| | | | | | | | | | | notified when model association fails. BUG=36824 TEST=unit test Review URL: http://codereview.chromium.org/660148 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40469 0039d316-1c4b-4281-b951-d872f2087c98
* Disable ProfileSyncServiceAutofillTest since they're causing hangs.jam@chromium.org2010-03-021-3/+6
| | | | | | | BUG=37244 Review URL: http://codereview.chromium.org/661411 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40450 0039d316-1c4b-4281-b951-d872f2087c98
* Move a debug string util to syncer proto util. Add better getupdates logging ↵chron@google.com2010-03-026-27/+59
| | | | | | | | in debug builds. Review URL: http://codereview.chromium.org/660346 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40436 0039d316-1c4b-4281-b951-d872f2087c98