summaryrefslogtreecommitdiffstats
path: root/sync
Commit message (Collapse)AuthorAgeFilesLines
* Fix various style errors in sync/test/fake_serverpvalenzuela@chromium.org2014-05-135-32/+32
| | | | | | | | | | | | These issues were found using third_party/libvpx/source/libvpx/tools/cpplint.py (except for the instances of explicit multi-arg constructors). BUG=NONE Review URL: https://codereview.chromium.org/278523002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270153 0039d316-1c4b-4281-b951-d872f2087c98
* Sync: Do not generate non-UTF8 names for delete directives.thestig@chromium.org2014-05-131-0/+1
| | | | | | | | BUG=371184 Review URL: https://codereview.chromium.org/273283002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270035 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Move NonBlockingTypeProcessor to sync/enginerlarocque@chromium.org2014-05-138-12/+7
| | | | | | | | | | | | | | | | | | | | | | | | Moves NonBlockingTypeProcessor from sync/internal_api to sync/engine. It's become increasingly clear to me that the NonBlockingTypeProcessor will be too big to expose outside of sync. When it comes time to export its functionality, we'll need to define a wrapper class with a simpler interface. This means that there's no benefit to keeping it in internal_api. There is a benefit to moving this to sync/engine. In this location, it should be able to collaborate more closely with its sibling, the NonBlockingTypeProcessorCore. We intend to start adding lots of code to this class soon. It's a good idea to get this move out of the way first, so we can have a better git history in the end. BUG=351005 Review URL: https://codereview.chromium.org/280693003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270025 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Implement disabling of non blocking typesrlarocque@chromium.org2014-05-1211-32/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds logic to have the model-thread NonBlockingDataTypeProcessor send a message to the sync-thread SyncCore when it receives notifcation from the ui-thread NonBlockingDataTypeController that it should stop syncing. This message will allow the sync thread to stop requeting updates and commits on behalf of the now-disabled type. Fixes the handling of a race in the NonBlockingDataTypeProcessor. The race is as follows: 1. NBDTP receives a request to enable sync from the UI thread, and sends a connection request to the sync thread via SyncCoreProxy. 2. NBDTP receives a request to disable sync from the UI thread. It updates its internal state accordingly. 3. NBDTP receives the connection OK response from the sync thread, which was genrated in response to its request in step 1. Previously, the processor would wrongly set itself to the enable state in step 3. The fix is to use a new WeakPtrFactory and invalidate the pointers it has issued in step 2 in order to prevent the response seen in step 3 from being run. Adds some more tests for this scenario and more. The test framework had to be made a bit more complicated in order to handle these tests, but I think the extra complexity is worth it. I don't know of any other way to reliably defend against these race cases. BUG=351005 Review URL: https://codereview.chromium.org/272323002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269916 0039d316-1c4b-4281-b951-d872f2087c98
* Add a ClientAction used by SyncRollbackManager to notify PSS that rollback ishaitaol@chromium.org2014-05-107-2/+49
| | | | | | | | | | finished. BUG=362679 Review URL: https://codereview.chromium.org/263273002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269615 0039d316-1c4b-4281-b951-d872f2087c98
* Add a reason for configuring DTM for backup/rollback. In backup/rollback,haitaol@chromium.org2014-05-101-0/+3
| | | | | | | | | | only add control types in addtional to user selectable types. BUG=362679 Review URL: https://codereview.chromium.org/266883007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269612 0039d316-1c4b-4281-b951-d872f2087c98
* Move code from sync/api/attachments to sync/internal_api/attachments.maniscalco@chromium.org2014-05-1013-21/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | The goal is to reorganize the sync attachment code so that in the future attachment code can include stuff it needs (like src/net/) without loosening the DEPS rules for the rest of sync. Replace internal_api's coarse grained dep on net/ with finer grained deps. sync/api/attachments - Home to attachment code that's needed by both sync itself and users of sync. sync/internal_api/public/attachments - Home to attachment headers needed by sync/api/attachments. sync/internal_api/attachments - Home to attachment code that's private to sync. TBR=mef,erikwright,phajdan.jr BUG= Review URL: https://codereview.chromium.org/270633005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269481 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor password sync integration testsrlarocque@chromium.org2014-05-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactors the password sync integration tests so they no longer require self-notifications or access to progress markers. This will allow them to work in the future when we refactor the integration tests to no longer depend on sync internals. Introduces two new Await*() functions for passwords. One is used to wait until all profiles have matching passwords state. The other waits until a single profile matches the verifier. Together, these are enough to replace most uses of AwaitQuiescence(), AwaitCommitActivityCompletion(), and other await conditions that will not be supported in the new style of integration tests. Refactors some two client tests into multi (ie. three) client tests. These are the tests that formerly relied on AwaitCommitActivityCompletion() to ensure that certain changes were committed to the server. Using three clients allows us to set up a "canary" client that can be used to infer that items are committed based on the fact that it has received them. Removes a few redundant tests. Note to sheriffs: The TwoClientPasswordTest.Delete test may be flaky. I believe it was flaky before the refactor, and it may still be flaky now. Please disable it and assign the bug to me if it causes problems. BUG=97780,95742 Review URL: https://codereview.chromium.org/267743003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269198 0039d316-1c4b-4281-b951-d872f2087c98
* Let sync backup/rollback manager return a dummy encryption handler.haitaol@chromium.org2014-05-092-7/+22
| | | | | | | | | | | | Backup/rollback doesn't require encryption while sync backend currently assumes there's an encryption handler ready to use. So use a dummy one to avoid crash. BUG=362679 Review URL: https://codereview.chromium.org/268163002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269147 0039d316-1c4b-4281-b951-d872f2087c98
* Add InjectEntity method to Sync FakeServerpvalenzuela@chromium.org2014-05-0711-60/+304
| | | | | | | | | | | | | | | | | | | This is the first CL to create the API to inject test data in the Sync FakeServer. Summary of changes: 1) Creation of FakeServer::InjectEntity 2) Creation of InjectedEntityBuilder (tests will use this API to create FakeServerEntity objects that will later be passed to InjectEntity) 3) Creation of a simple bookmark test to use this functionality 4) FakeServer's default permanent items are now created during object creation (this was previously done on-demand) BUG=365774 Review URL: https://codereview.chromium.org/263723003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268881 0039d316-1c4b-4281-b951-d872f2087c98
* Remove {linux|android}_use_tcmalloc and switch to use_allocator in Chromium.dmikurube@chromium.org2014-05-071-2/+1
| | | | | | | | | | | | | | If this change breaks some bots, please try restarting the bot before reverting it. http://crrev.com/264460 may not be effective yet until restarting. See the bug and http://crrev.com/255129 for the details. BUG=345554 Review URL: https://codereview.chromium.org/258433005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268876 0039d316-1c4b-4281-b951-d872f2087c98
* GCMNetworkChannel: Status of outgoing messages recorded incorrectly in UMA.pavely@chromium.org2014-05-071-1/+1
| | | | | | | | | | | When recording UMA histogram for outgoing message status I passed constant instead of actual parameter. Fixing it. R=zea@chromium.org Review URL: https://codereview.chromium.org/263083015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268790 0039d316-1c4b-4281-b951-d872f2087c98
* Move IsStringUTF8/ASCII to base namespacebrettw@chromium.org2014-05-071-1/+1
| | | | | | | | TBR=sky@chromium.org Review URL: https://codereview.chromium.org/270183002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268754 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Plumb per-type counter observers to UIrlarocque@chromium.org2014-05-0711-1/+134
| | | | | | | | | | | | | | | | | Implements the plumbing to get events from the DirectoryTypeDebugInfoEmitters in the ModelTypeRegistry, through the SyncManager, SyncBackendHostCore, and SyncBackendHost to the ProfileSyncService. At the moment, there are no observers register and no events are emitted. Future patches will include logic to update the counters and to expose their values on the about:sync page. BUG=328606 Review URL: https://codereview.chromium.org/269543020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268747 0039d316-1c4b-4281-b951-d872f2087c98
* Generate AttachmentId's unique_id using base::GenerateGUID.maniscalco@chromium.org2014-05-061-3/+5
| | | | | | | | | | | Use GenerateGUID instead of generating a random number "by hand" with base::RandBytesAsString. BUG= Review URL: https://codereview.chromium.org/266363002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268616 0039d316-1c4b-4281-b951-d872f2087c98
* Use a framework method to decrease code duplication in SyncStatusHelpercimamoglu@chromium.org2014-05-061-24/+5
| | | | | | | | | | Use StrictMode.allowThreadDiskWrites instead of temporarilyAllowDiskWritesAndDiskReads. The former method does exactly the same thing. Review URL: https://codereview.chromium.org/267453002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268481 0039d316-1c4b-4281-b951-d872f2087c98
* Use FakeServer-based invalidations for Sync testspvalenzuela@chromium.org2014-05-055-62/+140
| | | | | | | | | | | | | | | | | | | | | Note: this is a second go-round for this CL. It was originally committed as r267422 but was reverted due to a compile error in some dead code. The dead code was deleted in https://codereview.chromium.org/264773007/ (r267686). See https://codereview.chromium.org/234113002/ for the original CL. This CL creates a new InvalidationService implementation, FakeServerInvalidationService, to remove FakeServer-based tests' dependency on the Python XMPP server. Another major change is that FakeServer's HandleCommand is now executed on the UI thread and locking has been removed from FakeServer itself. BUG=323265 Review URL: https://codereview.chromium.org/267723012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268311 0039d316-1c4b-4281-b951-d872f2087c98
* Add AttachmentUploader interface and fake implementation.maniscalco@chromium.org2014-05-059-4/+202
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/263903004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268245 0039d316-1c4b-4281-b951-d872f2087c98
* Add remote_install flag to extension sync data.mek@chromium.org2014-05-032-0/+5
| | | | | | | | | | | This is the first step in adding support for remote installation of extensions and apps. BUG=365737 Review URL: https://codereview.chromium.org/264933005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268053 0039d316-1c4b-4281-b951-d872f2087c98
* Improve about:sync output for enhanced_bookmarks experiment.yfriedman@chromium.org2014-05-021-1/+9
| | | | | | | | Output the extension id as well as whether the experiment is enabled. Review URL: https://codereview.chromium.org/267653004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267939 0039d316-1c4b-4281-b951-d872f2087c98
* Keep track of which attachments are referenced by which sync entries.maniscalco@chromium.org2014-05-0227-130/+640
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Relanding https://codereview.chromium.org/247983002/ after fixing memory leak. PutAttachmentMetadata on MutableEntry now notifies the Directory when the attachments associated with an entry change. Give Directory::InitializeIndices a ScopedKernelLock to be consistent and make it easier to ensure we are locking when we need to. GenericChangeProcess passes new attachments to AttachmentService for storage and upload. Add an output parameter to GenericChangeProcessor's HandleActionAdd and HandleActionUpdate methods so they can keep track of potentially new attachments and pass them to AttachmentService for storage/upload. Convert AttachmentService's OnSyncDataAdd to StoreAttachments. Implement HasAttachmentNotOnServer. BUG=348625,353303,354530,356266 Review URL: https://codereview.chromium.org/264793007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267887 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Expose DirectoryDebugInfoEmitters in enginerlarocque@chromium.org2014-05-0210-45/+121
| | | | | | | | | | | | | | | | | | | | | | Changes the lifetime of DirectoryTypeDebugInfoEmitters, DirectoryCommitContributors, and DirectoryUpdateHandlers. Under the old lifetime management design, we had no state that lived beyond a configure cycle. This would be bad, since we want the debug info counter values to remain after the initial configure is done. The refactoring ensures that the DirectoryTypeDebugInfoEmitters will live as long as their data type is enabled. As a side effect, the commit contributors and update handlers get to live that long, too. Plumbs the DirectoryTypeDebugInfoEmitters through the commit contributor and update handler classes. This prepares them for updating counters and emitting events from sync/engine/ code, although this functionality won't be implemented until the next patch in the series. BUG=328606 Review URL: https://codereview.chromium.org/260613002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267740 0039d316-1c4b-4281-b951-d872f2087c98
* Remove Sync FakeServer standalone executablepvalenzuela@chromium.org2014-05-024-213/+0
| | | | | | | | | | | | This code was created with the intention of being used in Android tests, but it has gone unused to this point. This qualifies as dead code right now, but we may bring it back in the future. BUG=NONE Review URL: https://codereview.chromium.org/264773007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267686 0039d316-1c4b-4281-b951-d872f2087c98
* Report GCM client types to invalidations library.pavely@chromium.org2014-05-027-10/+35
| | | | | | | | | | | | | | | This change pulls version of cacheinvalidations library with additional GCM_DESKTOP and GCM_IOS client types defined and passes correct client type to invalidation client. Client type is used on server to report traffic breakout by channel. BUG=325020 R=rlarocque@chromium.org Review URL: https://codereview.chromium.org/266673008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267683 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of Keep track of which attachments are referenced by which sync ↵maniscalco@chromium.org2014-05-0127-640/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | entries. (https://codereview.chromium.org/247983002/) Reason for revert: Looks like this may have introduced a memory leak: http://build.chromium.org/p/chromium.memory.fyi/builders/Linux%20Tests%20%28valgrind%29%282%29/builds/37232 Reverting. Will investigate and reland when appropriate. Original issue's description: > Keep track of which attachments are referenced by which sync entries. > > PutAttachmentMetadata on MutableEntry now notifies the Directory when > the attachments associated with an entry change. > > Give Directory::InitializeIndices a ScopedKernelLock to be consistent > and make it easier to ensure we are locking when we need to. > > GenericChangeProcess passes new attachments to AttachmentService for > storage and upload. > > Add an output parameter to GenericChangeProcessor's HandleActionAdd and > HandleActionUpdate methods so they can keep track of potentially new > attachments and pass them to AttachmentService for storage/upload. > > Convert AttachmentService's OnSyncDataAdd to StoreAttachments. > > Implement HasAttachmentNotOnServer. > > BUG=348625,353303,354530,356266 > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=267617 TBR=pavely@chromium.org,tim@chromium.org NOTREECHECKS=true NOTRY=true BUG=348625,353303,354530,356266 Review URL: https://codereview.chromium.org/265853004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267649 0039d316-1c4b-4281-b951-d872f2087c98
* Keep track of which attachments are referenced by which sync entries.maniscalco@chromium.org2014-05-0127-130/+640
| | | | | | | | | | | | | | | | | | | | | | | | | PutAttachmentMetadata on MutableEntry now notifies the Directory when the attachments associated with an entry change. Give Directory::InitializeIndices a ScopedKernelLock to be consistent and make it easier to ensure we are locking when we need to. GenericChangeProcess passes new attachments to AttachmentService for storage and upload. Add an output parameter to GenericChangeProcessor's HandleActionAdd and HandleActionUpdate methods so they can keep track of potentially new attachments and pass them to AttachmentService for storage/upload. Convert AttachmentService's OnSyncDataAdd to StoreAttachments. Implement HasAttachmentNotOnServer. BUG=348625,353303,354530,356266 Review URL: https://codereview.chromium.org/247983002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267617 0039d316-1c4b-4281-b951-d872f2087c98
* Renamed namespaces of url lib.vitalybuka@chromium.org2014-05-011-2/+1
| | | | | | | | | | | | | url_util -> url url_parse -> url url_canon -> url BUG=364747 TBR=atwilson,battre Review URL: https://codereview.chromium.org/262593002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267579 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Add NonBlockingDataTypeManagerrlarocque@chromium.org2014-05-015-5/+5
| | | | | | | | | | | | | | | | | | The new class manages the set of NonBlockingDataTypeControllers. Its logic could have fit into the ProfileSyncService, but the code is a bit cleaner if we factor it out into a separate class. This CL does actually instantiate and make use of the NonBlockingDataTypeManager, so it is not entirely a no-op. However, without any registered non-blocking types, there will be no NonBlockingDataTypeControllers for it to manage, so its functionality will be limited. BUG=351005 Review URL: https://codereview.chromium.org/251143003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267461 0039d316-1c4b-4281-b951-d872f2087c98
* Add SyncAuthProvider interface and implementationpavely@chromium.org2014-05-012-0/+34
| | | | | | | | | | | | | | | | | | SyncAuthProvider declares interface for sync engine to request and invalidate access token. SyncThreadProxy is very trivial implementation of SyncAuthProvider interface, the purpose is to post calls to UI thread without worrying that ProfileSyncAuthProvider will be invalid. ProfileSyncAuthProvider invokes corresponding functions from ProfileOAuth2TokenService. BUG=259913 R=tim@chromium.org Review URL: https://codereview.chromium.org/250943003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267446 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 267422 because it broke compile on linux-clang buildbots.sadrul@chromium.org2014-05-015-146/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The build failure: sync/test/fake_server/fake_sync_server_http_handler.cc:51:61: error: too many arguments to function call, expected 2, have 3 &response); ^~~~~~~~~ sync/test/fake_server/fake_server.h:44:3: note: 'HandleCommand' declared here void HandleCommand(const std::string& request, ^ > Use FakeServer-based invalidations for Sync tests > > This CL creates a new InvalidationService implementation, > FakeServerInvalidationService, to remove FakeServer-based tests' > dependency on the Python XMPP server. > > Another major change is that FakeServer's HandleCommand is now executed > on the UI thread and locking has been removed from FakeServer itself. > > BUG=323265 > > Review URL: https://codereview.chromium.org/234113002 TBR=pvalenzuela@chromium.org Review URL: https://codereview.chromium.org/269643002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267432 0039d316-1c4b-4281-b951-d872f2087c98
* Use FakeServer-based invalidations for Sync testspvalenzuela@chromium.org2014-05-015-62/+146
| | | | | | | | | | | | | | | This CL creates a new InvalidationService implementation, FakeServerInvalidationService, to remove FakeServer-based tests' dependency on the Python XMPP server. Another major change is that FakeServer's HandleCommand is now executed on the UI thread and locking has been removed from FakeServer itself. BUG=323265 Review URL: https://codereview.chromium.org/234113002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267422 0039d316-1c4b-4281-b951-d872f2087c98
* Drop TestSimpleTaskRunner from FakeAttachmentService.maniscalco@chromium.org2014-04-302-4/+1
| | | | | | | | | | | Use MessageLoopProxy::current() instead of TestSimpleTaskRunner allowing us to drop sync_api's dependency on test_support_base. BUG= Review URL: https://codereview.chromium.org/258043004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267272 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Introduce classes for per-type countersrlarocque@chromium.org2014-04-2917-76/+457
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduces the classes required to support per-type debug information. This system will eventually replace much of the StatusController and ModelNeutralState. Adds three counter objects. There is one for counters incremented during a GetUpdates, one for counters incremented during a commit, and one for "status" indicators like the total number of sync entities. Adds the DirectoryTypeDebugInfoEmitter, which will manage these counters. There will be one instance of this object per enabled directory-style sync ModelType. It owns the counters that will be updated by the CommitContributors and UpdateHandlers. It also collaborates with the ModelTypeRegistry to allow these CommitContributors and UpdateHandlers to notify observers of updated counter state. Adds the TypeDebugInfoObserver, the interface for classes that listen for counter updates. At the moment, this code won't actually do much. The counters are never incrememnted, no observers register for counter change events, and no such events are generated. Those pieces will be added in future commits. BUG=328606 Review URL: https://codereview.chromium.org/254473008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266991 0039d316-1c4b-4281-b951-d872f2087c98
* sync: don't require a MessageLoopProxy in AttachmentServiceProxyForTesttim@chromium.org2014-04-292-4/+15
| | | | | | | | | BUG=none R=maniscalco@chromium.org, pavely@chromium.org Review URL: https://codereview.chromium.org/254713003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266898 0039d316-1c4b-4281-b951-d872f2087c98
* sync: Include control types in node browserrlarocque@chromium.org2014-04-291-2/+4
| | | | | | | | | | | | | | Explicitly add the control types to the list of types to fetch nodes for during a request to GetAllNodes(). The control types don't register with the ProfileSyncService at startup like the other types do, so they're not in the list of GetRegisteredDirectoryDataTypes like the others. BUG=368012 Review URL: https://codereview.chromium.org/251133005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266803 0039d316-1c4b-4281-b951-d872f2087c98
* Remove changes remaining counter from about:syncrlarocque@chromium.org2014-04-2813-48/+8
| | | | | | | | | | | | | | | | | The label "changes remaining" is not quite correct. It's actually set to either zero or one, depending on whether or not the current sync cycle should result in more downloads. If there is an issue with infinite download looping, we should be able to detect and debug it based on the protocol logs, among other things. The protocol logs indicate when a GetUpdates response had a non-zero "changes remaining" value. BUG=349301 Review URL: https://codereview.chromium.org/256413007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266594 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce NonBlockingDataTypeControllerrlarocque@chromium.org2014-04-263-16/+51
| | | | | | | | | | | | | | | | | | | The NonBlockingDataTypeController tracks the sync state of a non-blocking data type and sends signals to its components from the UI thread. It is responsible for enabling and disabling sync for a data type according to user preference and the availbility of the sync backend. This CL also includes some changes to the NonBlockingDataTypeProcessor, which is currently just a stub of what will eventually become non-blocking sync's model thread component, so that it can be used in testing NonBlockingDataTypeController. BUG=351005 Review URL: https://codereview.chromium.org/249843002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266344 0039d316-1c4b-4281-b951-d872f2087c98
* Extract Profile-independent GCMService from GCMProfileServicebartfab@chromium.org2014-04-252-3/+3
| | | | | | | | | | | | | | | | | | | | | | | This CL moves most of the GCMProfileService functionality to a new GCMService class that does not depend on Profile. GCMProfileService becomes a subclass of GCMService that adds Profile-specific lifetime management and control over the service via user preferences. The CL is a prerequisite for Chrome OS device policy pushing, which will need to instantiate a Tango connection using device-wide GAIA credentials not tied to any user or Profile. The CL also fixes a few subtle bugs, such as GCMProfileService::IOWorker being shut down on the wrong thread and unit tests looking at the wrong GCMProfileService when trying to verify correct behavior. BUG=362083 TEST=Updated unit tests R=atwilson@chromium.org, dcheng@chromium.org, jianli@chromium.org, yoz@chromium.org Review URL: https://codereview.chromium.org/225403021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266197 0039d316-1c4b-4281-b951-d872f2087c98
* Calls FireRefreshTokenRevoked if an account is removed.acleung@chromium.org2014-04-251-0/+6
| | | | | | | | | | We cannot reply on periodic reconcile actions to remove accounts from cookies. The reason is that we actually *don't* do it at that stage for Android. Instead, we are going to keep a list of accounts last seen by Chrome and store that in a shared pref. We will come to the old list to the new list and call FireRefreshTokenRevoked accordingingly. BUG=305086 Review URL: https://codereview.chromium.org/213823004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266108 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor syncable_unittest.cc (continued).maniscalco@chromium.org2014-04-243-482/+385
| | | | | | | | | | | | | | Eliminate redundant test fixture (SyncableGeneralTest) and move the SyncableGeneralTest cases into directory_unittest.cc. StressTransactions now uses the SyncableDirectoryTest fixture instead of creating its own Directory. StressTransactions now lives in directory_unittest.cc This is a follow up to issue 248293002. BUG= Review URL: https://codereview.chromium.org/248463003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265949 0039d316-1c4b-4281-b951-d872f2087c98
* Implement syncing of bookmark apps.calamity@chromium.org2014-04-243-1/+10
| | | | | | | | | | | | | | | | | | | | | This CL adds syncing of bookmark apps. This involves syncing two extra fields, which are the bookmark app url and description. These are not populated for non-bookmark apps. The bookmark app name is obtained from the extension sync data's name field. Bookmark apps that are installled from sync will not have any icon. Updating the icon and possibly fetching it on sync will be implemented in a future CL. Bookmark apps that are updated with a new name will keep their icons. This CL also adds a GetWebApplicationInfoFromBookmarkApp() function that returns a ready-to-install WebApplicationInfo that is populated with the app's details and icons. BUG=318607 Review URL: https://codereview.chromium.org/229553003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265887 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor syncable_unittest.cc into smaller files.maniscalco@chromium.org2014-04-235-1287/+1413
| | | | | | | | | | No changes to test cases. Refactoring only. Ran through git cl format. BUG= Review URL: https://codereview.chromium.org/248293002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265741 0039d316-1c4b-4281-b951-d872f2087c98
* sync: always send entity specifics with bookmark tombstonestim@chromium.org2014-04-232-7/+15
| | | | | | | | BUG=365752 Review URL: https://codereview.chromium.org/248053002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265587 0039d316-1c4b-4281-b951-d872f2087c98
* Add a navigation redirect-chain to Sync sessions proto for offline analysis.donnd@chromium.org2014-04-234-0/+30
| | | | | | | | | | Google design doc at https://docs.google.com/a/google.com/document/d/1bh7aqvCMYzkobVA2MDuqWbQgymhdhdoqaOfvcLOaAYk BUG=310373 Review URL: https://codereview.chromium.org/101573003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265515 0039d316-1c4b-4281-b951-d872f2087c98
* Add initial FakeServer verification for Sync testspvalenzuela@chromium.org2014-04-235-3/+198
| | | | | | | | | | | | | | | This CL adds a method to FakeServer to export current data using base::Value. This data is consumed by a new class, FakeServerVerifier, that provides methods for verifying the data in integration tests. The initial verification is rather simple. For example, only entity names are compared and bookmark folders are not considered. BUG=NONE Review URL: https://codereview.chromium.org/242143002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265511 0039d316-1c4b-4281-b951-d872f2087c98
* Add an action for server to send down rollback command.haitaol@chromium.org2014-04-227-1/+19
| | | | | | | | BUG=362679 Review URL: https://codereview.chromium.org/238273008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265134 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Remove some std::wstring usage in sync.thestig@chromium.org2014-04-224-23/+22
| | | | | | | | BUG=23581 Review URL: https://codereview.chromium.org/235553007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265131 0039d316-1c4b-4281-b951-d872f2087c98
* Begin connecting AttachmentStore to AttachmentService.maniscalco@chromium.org2014-04-219-142/+320
| | | | | | | | | | | | | | | | | | | | AttachmentStore - Refactor interface to operate on lists of attachments instead of individual attachments. Operating on lists makes it easier to integrate with AttachmentService because AttachmentService operates on lists. AttachmentService - Simplify result enums to model only success and error (no more "not found"). In the future, once we have a better idea of what error cases we want to differentiate, we may expand the enums. AttachmentService - Return AttachmentMap by scoped_ptr to avoid an unnecessary copy. BUG=356351 Review URL: https://codereview.chromium.org/235923019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265029 0039d316-1c4b-4281-b951-d872f2087c98
* Add sync manager classes for backup/rollback:haitaol@chromium.org2014-04-2113-1/+1252
| | | | | | | | | | | * SyncBackupManager runs before first-sync to save local data in backup DB. * SyncRollbackManager deletes local data that's not found in backup DB. BUG=362679 Review URL: https://codereview.chromium.org/235053006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265027 0039d316-1c4b-4281-b951-d872f2087c98
* Add pavely@ to sync OWNERStim@chromium.org2014-04-171-0/+1
| | | | | | | | | | TBR=nyquist@chromium.org BUG=none NOTRY=true Review URL: https://codereview.chromium.org/241173002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264670 0039d316-1c4b-4281-b951-d872f2087c98