| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
BUG=
Review URL: https://codereview.chromium.org/174443002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252763 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Puts the DirectoryCommitContributor and DirectoryUpdateHandler
classes behind interfaces. These classes were always intended
to form the basis of an abstract interface. Now we can start
to introduce alternate implementations of them.
This CL includes one such alternate implementation. It adds
the MockUpdateHandler and uses it to remove some unnecessary
boilerplate from the download unit tests.
This CL also resolves an old TODO. It renames the SyncDirectory*
classes to Directory*, since the 'Sync' part of the name is redundant.
This should have no effect on program behavior.
BUG=278484
Review URL: https://codereview.chromium.org/161253002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251969 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Consolidate the various implementations of SyncChangeProcessorDelegate and
fake into sync/api. Replace many of the fake SyncChangeProcessor
implementations with a slightly more advanced FakeSyncChangeProcessor.
TBR=brettw@chromium.org
BUG=
Review URL: https://codereview.chromium.org/151963002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251926 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
some forthcoming unit tests. AttachmentStore will likely change a lot in a future CL.
Renamed SyncAttachment to Attachment.
Renamed SyncAttachmentId to AttachmentId.
Added CreateId method to Attachment.
BUG=
Review URL: https://codereview.chromium.org/104813004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249160 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change implements sending client-to-server messages in
GCMNetworkChannel. Implementation mimics what android implementation is
doing. To send message to server GCMNetworkChannel needs GCM
registration Id and access token. Registration Id is requested during
initialization and doesn’t change through process lifetime. Access token
is requested for every message. Errors are not handled,
cacheinvalidations will retry sending message if it doesn’t see
confirmation from server that the message was received. The only handled
error is HTTP_UNAUTHORIZED from tango server since access token needs to
be invalidated in this case.
Actual work of requesting registration id and access token is delegated
to GCMNetworkChannelDelegate interface. Implementation of this interface
will live in chrome/browser/invalidation directory and will use
GCMProfileService for registration and ProfileOAuth2TokenService for
token functions.
There are two things that are still not implemented:
- Register error handling: will need to implement retry.
- Building url for tango endpoint: this involves preparing and base64
encoding NetworkEndpointId protobuf from cacheinvalidations library.
Will address both in next CL.
BUG=325020
Review URL: https://codereview.chromium.org/140513002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246377 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL provides just enough functionality so that
PrototypeFakeServerTest will pass.
This was originally committed as r245326, but was reverted due to
compile errors.
BUG=323265
Review URL: https://codereview.chromium.org/139783006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245732 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce the ModelTypeRegistry class and use it to manage the creation
of UpdateHandlers and CommitContributors. The ModelTypeRegistry also
gets some help from the newly introduced UpdaterList and CommitterList
classes.
This lets us move the verbose iteration logic out of the code that's
focused on building and executing commits and updates, which should make
those functions easier to read. It gives us more freedom to experiment
with other ways to manage the lists of commit contributors and update
handlers, should we choose to do so. It prevents us from leaking the
set of enabled types through the per-type maps.
This patch is one of the last in the stack related to building a
per-type abstraction into the sync engine, and also one of the first
steps towards implementing run-time enable and disable logic for the
new-style sync types.
BUG=278484
Review URL: https://codereview.chromium.org/93433006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245654 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
> Basic implementation of the Sync C++ fake server
>
> This CL provides just enough functionality so that
> PrototypeFakeServerTest will pass.
>
> BUG=323265
>
> Review URL: https://codereview.chromium.org/115243007
TBR=pvalenzuela@chromium.org
Review URL: https://codereview.chromium.org/130503007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245341 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
This CL provides just enough functionality so that
PrototypeFakeServerTest will pass.
BUG=323265
Review URL: https://codereview.chromium.org/115243007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245326 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change introduces boilerplate GCMNetworkChannel implementation and switches
sync/notifier classes to refer network channel through base class
SyncNetworkChannel.
TiclInvalidationService can initialize invalidator with either PushClient or
GCM channel. On one hand goal was to not expose network channel implementation to
TiclInvalidationService, on the other hand to avoid passing channel specific
parameters across sync/notifier classes during initialization.
The solution is to introduce NetworkChannelCreator callback that takes no
parameters and returns scoped_ptr to SyncNetworkChannel. There are helper
functions in SyncNetworkChannel to create implementations for Puch/GCM clients
and helper functions in NonBlockingInvalidator to createNetworkChannelCreator.
The alternative was to create NetworkChannel factory interface and write
implementations of it for each channel type. This would provide more expressive
names, but requires interface and two implementations for simple purpose.
Review URL: https://codereview.chromium.org/116533006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242991 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
SyncAttachmentId. The interfaces are still in flux and will likely change.
Review URL: https://codereview.chromium.org/102193004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242818 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary of work:
- get tests passing with or without --enable-sync-sessions-v2 (unit_tests, browser_tests, sync_integration_tests)
- did not deal with the disabled sessions perf test. requires non-trival changes, and I'm not sure it's worthwhile yet.
- impelement StopSyncing, GetAllSyncData
- fixed a bug discovered by manual testing where the client tag for a tab node was using an invalid tab_node_id on update.
- remove most remaining references to SessionModelAssociator
- ran some manual coverage of backwards compatibility with v1
This patch does add temporary complexity to a few tests, namely WrenchMenuControllerTest and RecentTabsSubMenuModelTest. The goal was to make things work with or without the flag to minimize diffs during rollout, if we have to swap flag values. I'll remove the extra code once SessionModelAssociator is no more.
BUG=98892
Review URL: https://codereview.chromium.org/110583002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241582 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change moves the update application functionality from the
ApplyUpdatesAndResolveConflictsCommand into the
SyncDirectoryUpdateHandler class. This change will allow us to
implement update application differently for different types.
Because update application happens on the model threads, the
ApplyUpdatesAndResolveConflictsCommand had to be aware of
ModelSafeRoutingInfo, ModelSafeWorkers, and other concepts intended to
hide threading details. The new code takes a different approach. It
hides the threading details specific to each type inside its
SyncDirectoryUpateHandler by initializing it with a scoped_refptr to its
associated ModelSafeWorker.
The ApplyUpdatesAndResolveConflictsCommand was the last SyncerCommand.
With its removal, we can also remove the definitions of SyncerCommand,
ModelChangingSyncerCommand and SyncerCommandTest.
BUG=278484
Review URL: https://codereview.chromium.org/72403003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238532 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enable the new invalidation ack tracking API. This system allows the
invalidations system to remember invalidations that have not been acted upon
yet across browser restarts.
New features include:
- Supports saving multiple invalidation payloads per ObjectID.
- Supports tracking lost or dropped invalidations.
- Remembers "unknown version" invalidations across restarts.
- Can send multiple payloads in a single callback.
- Does not periodically ping unacked invalidations.
A series of commits prior to this one have put much of the framework in place
already. This CL does not change the types and signatures of client-facing
APIs very much, but it does enable perviously disbaled behavior. This CL
includes updates to the client code to allow them to support the new semantics
with (hopefully) few changes to externally visible behavior.
Most of the big changes are in the classes and tests associated with the
internals of Invalidations. Large parts of the SyncInvalidationListener and
InvalidatorStorage have been rewritten.
BUG=233437
Review URL: https://codereview.chromium.org/56113003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237421 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replaced DebugInfoGetter::GetAndClearDebugInfo with GetDebugInfo and ClearDebugInfo so we can clear the debug info only after we have successfully sent it to the server.
Moved MockDebugInfoGetter into its own file so it can be used by other tests.
BUG=319937
Review URL: https://codereview.chromium.org/61213009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236591 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=318423
TBR=owners
Review URL: https://codereview.chromium.org/68193002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235208 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commits classes that are part of the infrastructure of the new local
acknowledgement system for invalidations, which will be based on
WeakHandles to AckHandlers.
BUG=233437
Review URL: https://codereview.chromium.org/40303005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231983 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduces a new class that represents a syncable::Directory's udpate
requesting and processing capabilities. The intention is that this will
eventually be expanded to cover commits as well. Eventually, this will
be used as the basis for an interface between sync and
Some update logic has been moved into this SyncDirectoryUpdateHandler
class or download.cc. The rest of it can be found in
process_update_util.cc, the successor to the old ProcessUpdatesCommand.
The StoreTimestampsCommand has been entirely removed. The unit tests
associated with these SyncerCommands have been ported to
sync_directory_update_handler_unittest.cc.
Except for a few error scenarios that are now handled differently, the
observable behavior of the client should not be changed by this CL.
BUG=278484
Review URL: https://codereview.chromium.org/38803003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231878 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the part of sync backend initialize flow that posts a task to the
UI thread. The only part of this task that could not easily be moved on
to the sync thread or defered for later was the setting of the
initialization_state_ flag. However, as of r224014 that flag is no
longer useful, so the refactoring can proceed.
Replace the initialization_state_ variable with a bool. The code no
longer requires a set of enum values to represent the backend's
initialization state.
This change broke the TestProfileSyncService pretty badly. That test
class was fixed by moving around some code in order to allow us to
inject testable hooks into SyncManager.
BUG=295806
Review URL: https://codereview.chromium.org/23698015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230550 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a class that holds all locally unacknowledged invalidations and
their state. It is not used anywhere outside of tests.
This class is part of an attempt to refactor the InvalidatorStorage
class. That class stores pieces of the invalidations component's state
in preferences. It currently has some simple getter and setter methods
for things like the client ID and bootstrat data, and some more
complicated methods that related to storing unacked invalidations.
The goal is to eventually move the complex logic related to
invalidations out of the InvalidationStorage class, and into the
UnackedInvalidationSet class. The UnackedInvalidationSet class can
be owned by the SyncInvalidationListener, and periodically passed back
to the InvalidationStorage class on a separate thread for serialization.
The motivation for this refactoring is not merely aesthetic. The
UnackedInvalidationSet handles certain trickles related use cases
that the current storage system can not. Extending the existing storage
system to support these features would have made the code much harder to
understand. This approach lets us add functionality and simplify the
code at the same time.
BUG=233437
Review URL: https://codereview.chromium.org/26141004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230529 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move most commit logic into per-type instances of
SyncDirectoryCommitContributor and SyncDirectoryCommitContribution
classes. Make GetCommitIdsCommand and ProcessCommitResponseCommand
into container classes with only static methods. Remove
OrderedCommitSet.
The point of these changes is to make way for different kinds of entity
committers. The SyncDirectoryCommitContributor and
SyncDirectoryCommitContribution will eventually refactored into
implementations of more generic "commit contributor" and "commit
contribution" interfaces.
This commit leaves us with some structures that might look a bit odd to
someone unfamiliar with the history of this code. In particular, many
of the old SyncerCommands look out of place. We plan to refactor them
in future CLs. For now, it's more important to make sure this CL has an
easy to read diff.
BUG=278484
Review URL: https://codereview.chromium.org/25638003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228810 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Convert the Invalidation struct into a class. This allows us to hide
its members, so we can do things like add a DCHECK to make sure we never
access the payload field of an unknown version invalidation. It also
lets us use factory methods and constructors to initialize it rather
than having to initialize its fields one by one.
Convert the ObjectIdInvalidationMap from a typedef into a class. Unlike
the typedef, the class supports multiple invalidations for the same
object ID. It uses the newly introduced SingleObjectInvalidationSet to
manage the set of invalidations belonging to a particular ID. Note that
the current code still sends only one invalidation per type; that will
be changed in a future commit.
The end goal of this refactoring is to make these classes smarter so
they can help manage the complexity that will be introduced when we
implement invalidation 'trickles' support.
Note that this commit changes the on-disk format for invalidations, so
any invalidations currently stored in the profile may be lost on
upgrade. There should be no other notable changes to invalidations
behavior in this CL.
TBR=brettw
BUG=233437
Review URL: https://codereview.chromium.org/23441042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226949 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce a new object to communicate cross-thread cancellation signals.
This new object, the CancellationSignal, is protected by a lock. It
allows the receiving thread to query whether or not a stop has been
requested. It also allows the receiving thread to safely register a
cross-thread callback to be invoked immediately when a stop is
requested.
We use two instances of this class to ensure we meet all the
requirements for a safe and fast sync backend shutdown.
The first instance is used with the HttpBridgeFactory to allow the UI
thread to force it to drop all refereces to its RequestContextGetter
immediately. This is an important part of our plan to ensure that all
references to that object are released before
ProfileSyncService::Shutdown() returns, which is necessary to avoid
racy crashes at shutdown. (See crbug.com/236451)
The second instance is used with the ServerConnectionManager and the
Syncer. Once signalled, it ensures that any active connections are
released (possibly decrementing another ref to the
RequestContextGetter), that any blocking I/O is aborted, and that no
more connections will be instantiated. It's important to prevent the
creation of more connections because the HttpBridgeFactory might trigger
a crash if we asked it to create another connection after it had been
shut down.
The syncer's interaction with the second cancelation signal is more
passive. It does not execute any callbacks when the signal is sent.
Instead, it queries the signal as it performs sync cycles, and will cut
short any existing sync cycle if it notices the signal has been sent.
Finally, this CL includes one important change to the initialization of
the HttpBridgeFactory. In order to properly register with the
cancellation signal while still allowing the creation of the user agent
to occur on the sync thread, its initialization had to be split into two
parts. This class now has an Init() method in addition to its
constructor.
BUG=236451
Review URL: https://chromiumcodereview.appspot.com/23717047
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224014 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Makes tests very Flaky.
http://test-results.appspot.com/dashboards/flakiness_dashboard.html#group=%40ToT%20Chromium&testType=sync_integration_tests&tests=TwoClientPasswordsSyncTest.SetPassphraseAndThenSetupSync
Can reproduce on local build.
> sync: Gracefully handle very early shutdown
>
> Introduce a new object to communicate cross-thread cancellation signals.
> This new object, the CancellationSignal, is protected by a lock. It
> allows the receiving thread to query whether or not a stop has been
> requested. It also allows the receiving thread to safely register a
> cross-thread callback to be invoked immediately when a stop is
> requested.
>
> This class is used to reimplement the UI thread to sync thread early
> shutdown signal. Previously, the UI thread would try to call in to
> objects owned by the sync thread. This required a workaround if the
> signal arrived very early, since we couldn't guarantee the sync thread
> had actually created those objects until later. The CancellationSignal
> is owned by the UI thread, so it is safe to call its RequestStop() at
> any point during sync initialization. The sync thread will receive the
> signal when it's ready.
>
> The new scheme has a few advantages over the old:
> - Thread ownership is simpler. The SyncBackendHost::Core, SyncManager,
> ServerConnectionManager, SyncScheduler and Syncer can now claim that
> all their member functions run on the sync thread.
> - We no longer need to implement special case logic for when a shutdown
> is requested before the SyncManager has initialized.
> - In a future CL, we can take advantage of the fact that we no longer
> require the special case to reduce inter-thread communication during
> sync startup. This will make startup simpler and, in some cases,
> improve sync startup time by as much as a few hundred milliseconds.
> - This will make it easier to address crbug.com/236451.
>
> BUG=236451
>
> Review URL: https://chromiumcodereview.appspot.com/23189021
TBR=rlarocque@chromium.org
Review URL: https://codereview.chromium.org/23658030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222205 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce a new object to communicate cross-thread cancellation signals.
This new object, the CancellationSignal, is protected by a lock. It
allows the receiving thread to query whether or not a stop has been
requested. It also allows the receiving thread to safely register a
cross-thread callback to be invoked immediately when a stop is
requested.
This class is used to reimplement the UI thread to sync thread early
shutdown signal. Previously, the UI thread would try to call in to
objects owned by the sync thread. This required a workaround if the
signal arrived very early, since we couldn't guarantee the sync thread
had actually created those objects until later. The CancellationSignal
is owned by the UI thread, so it is safe to call its RequestStop() at
any point during sync initialization. The sync thread will receive the
signal when it's ready.
The new scheme has a few advantages over the old:
- Thread ownership is simpler. The SyncBackendHost::Core, SyncManager,
ServerConnectionManager, SyncScheduler and Syncer can now claim that
all their member functions run on the sync thread.
- We no longer need to implement special case logic for when a shutdown
is requested before the SyncManager has initialized.
- In a future CL, we can take advantage of the fact that we no longer
require the special case to reduce inter-thread communication during
sync startup. This will make startup simpler and, in some cases,
improve sync startup time by as much as a few hundred milliseconds.
- This will make it easier to address crbug.com/236451.
BUG=236451
Review URL: https://chromiumcodereview.appspot.com/23189021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222154 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Removes the definition and all uses of ModelTypeInvalidationMap.
The ModelTypeInvalidationMap was useful only for sync-related
invalidations. Its existence made sense when sync was the only client
for invalidations. Now that we have many invalidations clients, it
makes sense to replace it with the more generic ObjectIdInvalidationMap.
The reason for doing this now is that the ObjectIdInvalidationMap will
soon be modified to be incompatible with the current definition of
ModelTypeInvalidationMap. In order to support trickles it will be
modified to allow it to contain several invalidations per ObjectId.
Although it would have been possible to maintain compatibility by making
a corresponding modification to ModelTypeInvalidationMap, there's really
no point in having two invalidation map types. In the long run, it
makes more sense to deprecate ModelTypeInvalidationMap.
BUG=233437
Review URL: https://chromiumcodereview.appspot.com/23238005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221025 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The SyncSourceInfo was a struct that contained a GetUpdatesSource and a
ModelTypeInvalidationMap. Both of these types are in the process of
being deprecated. The SyncSourceInfo itself was used only for debugging
(about:sync), tests (mostly sync_scheduler_unittest.cc) and maintaining
compatibility with some old function signatures.
Removing the SyncSourceInfo allow us to remove dependencies on
ModelTypeInvalidationMap, which is a step towards enabling invalidation
"trickles" support.
BUG=233437
Review URL: https://chromiumcodereview.appspot.com/19982002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215446 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Disconnect non-frontend processor/associator to stop accessing directory
so that sync backend can be shut down without waiting.
* Change non-frontend controller so that creation/destruction of
processor/associator doesn't depend on valid controller. So
scoped wait on stopping controller can be removed.
* Move sync thread to PSS. It's created when starting first backend and
destroyed on last browser thread.
BUG=19757
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=210333
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=210955
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=213642
Review URL: https://chromiumcodereview.appspot.com/16770005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214500 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reverting due to memory leaks.
BUG=264325
> Lock-free shutdown of profile sync service. Changes include:
> * Disconnect non-frontend processor/associator to stop accessing directory
> so that sync backend can be shut down without waiting.
> * Change non-frontend controller so that creation/destruction of
> processor/associator doesn't depend on valid controller. So
> scoped wait on stopping controller can be removed.
> * Move sync thread to PSS. It's created when starting first backend and
> destroyed on last browser thread.
>
> BUG=19757
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=210333
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=210955
>
> Review URL: https://chromiumcodereview.appspot.com/16770005
TBR=haitaol@chromium.org
Review URL: https://codereview.chromium.org/20374005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213671 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Disconnect non-frontend processor/associator to stop accessing directory
so that sync backend can be shut down without waiting.
* Change non-frontend controller so that creation/destruction of
processor/associator doesn't depend on valid controller. So
scoped wait on stopping controller can be removed.
* Move sync thread to PSS. It's created when starting first backend and
destroyed on last browser thread.
BUG=19757
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=210333
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=210955
Review URL: https://chromiumcodereview.appspot.com/16770005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213642 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change is a refactor to clean up ugliness introduced in previous
commits and prepare for future features.
The most notable change is the removal of "state machine" logic from
syncer.cc. This allows us to remove the SyncerSteps enum and related
code. The SyncShare function + enum parameters have been replaced with
the functions NormalSyncShare(), ConfigureSyncShare() and
PollSyncShare(). These changes should make it possible to address
crbug.com/109422, and to re-enable commits during poll-triggered sync
cycles (if desrired, see r206475).
The logic for fetching and applying updates has been modified, too.
Since the behaviour of GetUpdates varies depending on the type of cycle
(Configure, GetUpdates, or Poll) the logic to build and execute these
GetUpdate requests has been split up. This enables us to remove the
NudgeTracker from the SyncSession (an ugly hack introduced in
r199136). It should make it easier to implement crbug.com/147685.
In the interest of keeping this change as small and simple as possible
some obvious refactorings have not been intentionally excluded from this
CL. For example, the logic around when to send SYNC_CYCLE_ENDED events
or when to return true or false frome the SyncShare functions remains
very complicated. Untangling that mess would require some non-trivial
changes to the SyncScheduler, so they've been deferred until later.
BUG=147685,109422
Review URL: https://chromiumcodereview.appspot.com/17052007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209867 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The InvalidationService was introduced r199520. That commit added the
InvalidationService interface and several implementations of it, but
made no use of the new code. This commit builds on that work.
Up until now, TICL invalidations were handled on the sync thread. The
related objects were instantiated and owned by the SyncBackendHost and
SyncManager. All requests to update the set of object registrations had
to be passed to the sync thread. Components that wanted to receive
invalidations but were not part of sync had to route their communication
with the invalidations server through ProfileSyncService to get to the
sync thread. Things were a bit different on Android, but the system
still tried to pretend that invalidations were owned by the sync thread.
The new InvalidationService implementation is a ProfileKeyedService that
is mostly independent from sync. It still relies on sync to manage sign
in and fetch the appropriate auth tokens. However, it's now much easier
for components outside of sync to communication with the invalidations
server.
The new system allows us to remove a lot of invalidations-related code
from the ProfileSyncService, SyncBackendHost and SyncManager. Sync is
now just one of many clients of the InvalidationService. The
SyncBackendHost is responsible for forwarding messages back and forth
between the InvalidationService and the sync thread.
TBR=dcheng,satorux1,battre,rsimha,bauerb,sky,erg
BUG=124137
Review URL: https://chromiumcodereview.appspot.com/17699005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209264 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Do this moving data_encryption_win* into core/browser, since it's only used
from there.
BUG=140037
TEST=unit_tests,checkdeps.py
R=joi@chromium.org,isherman@chromium.org,akalin@chromium.org
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/17745004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208948 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
> Make use of InvalidationService
>
> The InvalidationService was introduced r199520. That commit added the
> InvalidationService interface and several implementations of it, but
> made no use of the new code. This commit builds on that work.
>
> Up until now, TICL invalidations were handled on the sync thread. The
> related objects were instantiated and owned by the SyncBackendHost and
> SyncManager. All requests to update the set of object registrations had
> to be passed to the sync thread. Components that wanted to receive
> invalidations but were not part of sync had to route their communication
> with the invalidations server through ProfileSyncService to get to the
> sync thread. Things were a bit different on Android, but the system
> still tried to pretend that invalidations were owned by the sync thread.
>
> The new InvalidationService implementation is a ProfileKeyedService that
> is mostly independent from sync. It still relies on sync to manage sign
> in and fetch the appropriate auth tokens. However, it's now much easier
> for components outside of sync to communication with the invalidations
> server.
>
> The new system allows us to remove a lot of invalidations-related code
> from the ProfileSyncService, SyncBackendHost and SyncManager. Sync is
> now just one of many clients of the InvalidationService. The
> SyncBackendHost is responsible for forwarding messages back and forth
> between the InvalidationService and the sync thread.
>
> TBR=sky,erg
> BUG=124137
>
> Review URL: https://chromiumcodereview.appspot.com/15580002
TBR=rlarocque@chromium.org
Review URL: https://codereview.chromium.org/17610004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208347 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The InvalidationService was introduced r199520. That commit added the
InvalidationService interface and several implementations of it, but
made no use of the new code. This commit builds on that work.
Up until now, TICL invalidations were handled on the sync thread. The
related objects were instantiated and owned by the SyncBackendHost and
SyncManager. All requests to update the set of object registrations had
to be passed to the sync thread. Components that wanted to receive
invalidations but were not part of sync had to route their communication
with the invalidations server through ProfileSyncService to get to the
sync thread. Things were a bit different on Android, but the system
still tried to pretend that invalidations were owned by the sync thread.
The new InvalidationService implementation is a ProfileKeyedService that
is mostly independent from sync. It still relies on sync to manage sign
in and fetch the appropriate auth tokens. However, it's now much easier
for components outside of sync to communication with the invalidations
server.
The new system allows us to remove a lot of invalidations-related code
from the ProfileSyncService, SyncBackendHost and SyncManager. Sync is
now just one of many clients of the InvalidationService. The
SyncBackendHost is responsible for forwarding messages back and forth
between the InvalidationService and the sync thread.
TBR=sky,erg
BUG=124137
Review URL: https://chromiumcodereview.appspot.com/15580002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208315 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change removes the ThrottledDataTypeTracker and moves much of its
functionality into the NudgeTracker. This allows us to better control
throttling behavior and fix crbug.com/155296.
This CL re-routes syncer_proto_util type throttling callbacks through
the SyncSession::Delegate to the SyncScheduler. It adds a timer and
some related functions to the SyncScheduler, so the scheduler can now
wake up, unthrottle types, and attempt a sync cycle at the exact time
when throttling expires.
The information about which types are currently throttled has been moved
to the NudgeTracker. This allows the NudgeTracker to take type
throttling into account in functions like NudgeTracker::IsSyncRequired()
and NudgeTracker::RecordSuccessfulSyncCycle().
The DownloadUpdatesCommand's special case for nudge-type syncs has been
extended to take throttling into account. GetCommitIdsCommand has been
updated to fetch its list of throttled types from the nudge tracker.
Unfortunately, this meant that committing from poll-triggered sync
sessions had to be disabled, since poll sync cycles do not have access
to the nudge tracker.
BUG=155296, 116184
Review URL: https://chromiumcodereview.appspot.com/16402013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206475 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Remove MockDirectorySyncerCommand (not used).
- Remove MockDirectory (used only by MockDirectorySyncerCommand).
- Remove Directory::InitKernelForTest (used only by MockDirectory).
- Merge ChildHandles and UnsyncedMetahandles typedefs into a single
Metahandles typedef.
- Rearrange declarations in directory.h to match Google C++ style.
- Create scoped_kernel_lock.cc; move related definitions from
directory.cc to this new file.
- Use DISALLOW_COPY_AND_ASSIGN instead of declaring an undefined
Directory::operator= manually.
BUG=245931
Review URL: https://chromiumcodereview.appspot.com/16591002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204828 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Update all the references from build/temp_gyp/googleurl.gyp to url/url.gyp.
r184: Fix C++11 compilation on iOS
r185: Forward includes to url/
BUG=229660
R=thestig@chromium.org,brettw@chromium.org
TBR=darin@chromium.org
Review URL: https://chromiumcodereview.appspot.com/15421002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203672 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This version uses URLFetcher instead of curl.
Original description (committed/reverted r198019):
"""
Initial version of Test Accounts service client. This client will
allow Chrome Sync tests to utilize the upcoming Test Accounts
service that allows short-term, exclusive access to test accounts
for the purpose of testing against real servers.
"""
BUG=
Review URL: https://chromiumcodereview.appspot.com/14591008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199805 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
which failed compile on Mac bot.
This reverts commit r198019.
TBR=pvalenzuela@chromium.org
Review URL: https://codereview.chromium.org/14892003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198039 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
allow Chrome Sync tests to utilize the upcoming Test Accounts
service that allows short-term, exclusive access to test accounts
for the purpose of testing against real servers.
BUG=
Review URL: https://chromiumcodereview.appspot.com/14295014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198019 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change removes SyncSessionJob entirely. The first step towards
this goal was to refactor all functions that depended on SyncSessionJob.
All these functions have either been inlined or modified to take
different parameters instead. DoSyncSessionJob was split into
two separate functions, one for configure jobs and one for nudge jobs,
which removes the need for SyncSessionJob's "purpose" member.
The SyncScheduler's pending_configure_job_ has been replaced with
a ConfigParams member, since that was the only part of the job still
being referenced. The pending_nudge_job_ has been replaced with
scheduled_nudge_time_ (which is similar to the old scheduled_start_
member of SyncSessionJob) and a new object called a NudgeTracker.
The NudgeTracker inherits the SyncSessionJob's responsibilities with
respect to coalescing nudge sources. The plan is to extend this class
to support more sophisticated nudge coalescing in the future. For now
it tries to emulate the old SyncSessionJob behaviour as closely as
possible.
Some of the refactoring does change behaviour. In particular, the
decision-making logic has been updated to fix issues 179515 and 155296.
BUG=175024,179515,155296
Review URL: https://chromiumcodereview.appspot.com/13743003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194766 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change rewrites the bookmark positioning system to use absolute,
arbitrary-precision, unique positions from end-to-end.
First, it introduces the concept of a UNIQUE_BOOKMARK_TAG. This has a
similar format to the UNIQUE_CLIENT_TAG, though bookmarks have never
supported unique tags previously. For new items, it is initialized
based on the bookmark's originator client item ID (ie. the "c-" style
ID) and the originator's cache_guid. These values should be globally
unique.
Many previously created items that exist in the database do not have
this information available. Non-committed items will still have this
information, and will have their tags set correctly. Previously
committed items will have server style IDs and no hint as to what the
originator_cache_guid is. In that common case, we will initialize the
tag with a "fake" one based solely on the server ID. This has the
advantage of being something that all existing clients will agree on,
even it if new clients and updated items/the server will disagree with
them.
To bring everyone back into sync, whenever they receive an update
clients will access the included originator_cache_guid and
originator_client_item_id fields and reset the UNIQUE_BOOKMARK_TAG field
according to the values they find there. Over time, clients should
converge towards the same tag values.
Next, this change adds the UNIQUE_POSITION and SERVER_UNIQUE_POSITION
fields to each entry. See the UniquePosition class documentation for
more information on their behaviour. New items should have their local
position updated when they are first inserted into the list, which
should happen shortly after they are initialized. Existing items will
have these fields populated from the SERVER_ORDINAL_IN_PARENT field and
the genrated UNIQUE_BOOKMARK_TAG. Unfortunately, all outstanding local
changes will be lost during the migration.
With the addition of UNIQUE_POSITION fields comes the removal of the
PREV_ID and NEXT_ID fields. This required significant refactoring of
the Directory so it could continue to support the PutPredecessor(),
GetPredecessorId(), GetSuccessorId() and GetFirstChildId() functions. A
new class, ParentChildIndex, has been introduced to contain some of the
complexity introduced by the new system. See that class' documentation
for more information.
Communication with the server has also been affected by this change.
The client will now set the unique_position field on every update. It
will also set the legacy server_position_in_parent field with a value
derrived from a truncation of its local UNIQUE_POSITION. This replaces
the existing server position in parent calculation through
interpolation.
The receipt of updates has been changed as well. If the client receives
an update with a unique_position, it will apply it. If the update was
written by an older client, it will contain only the
server_position_in_parent. In that case, the client will use that
position and the unique tag derrived from the update to construct a
unique position that approximates the server_position_in_parent value.
This will work well if the clients have not exceeded the available
precision in an int64. Otherwise, some spurious re-positioning may
occur.
Finally, all these changes required some updates to the tests. Some
arbitrary position assertions had to be updated, since the arbitrary
ordering has changed. Some test helpers have been updated to no longer
automatically place bookmarks at the end of the list; that logic has
been moved to the tests themselves.
BUG=145412, 126505, 147715, 101852, 107744, 112203, 123429, 177521, 20011
Review URL: https://chromiumcodereview.appspot.com/11885024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191767 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
> Reland libjingle.gyp changes.
> The changes are the same as in the previous review:
> https://codereview.chromium.org/12457027/
>
> I had to revert due to build problems but eventually tracked
> them down to chromeos dependencies in sync. For 'sync', this
> is a problem for shared_library builds but not otherwise.
> For sync_unit_tests, this is a problem since sync_unit_tests
> is always built as an executable.
>
> Previously these problems were masked since the dependencies
> were being pulled in via libjingle.
>
> TBR=ronghuawu,akalin
>
> Review URL: https://codereview.chromium.org/12930010
TBR=tommi@chromium.org
Review URL: https://codereview.chromium.org/13009009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190131 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The changes are the same as in the previous review:
https://codereview.chromium.org/12457027/
I had to revert due to build problems but eventually tracked
them down to chromeos dependencies in sync. For 'sync', this
is a problem for shared_library builds but not otherwise.
For sync_unit_tests, this is a problem since sync_unit_tests
is always built as an executable.
Previously these problems were masked since the dependencies
were being pulled in via libjingle.
TBR=ronghuawu,akalin
Review URL: https://codereview.chromium.org/12930010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190128 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The InvalidationController needs to be started and stopped based on when
the main activity is resumed and paused. This upstreams the listener
part of that.
It also adds a test for the new functionality and a mock implementation
of the SyncContentResolverDelegate.
BUG=159203
Review URL: https://chromiumcodereview.appspot.com/12310008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183975 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We were using package_name as a unique name for naming output files and
directories. package_name was typically the same as _target_name or a
variation of it (like dropping _apk). Using _target_name instead means
we need to specify one less thing and it is (maybe?) guaranteed to be
unique.
TBR=brettw,joi,jar,fischman,zea,sky
BUG=
Review URL: https://chromiumcodereview.appspot.com/11308030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183639 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, both Android Java-targets live within sync_tests.gypi. This
CL moves the prod target sync_java out to a separate file, and also adds
per-file OWNERS entries for that file, using the same owners as in
sync/android/OWNERS.
BUG=None
Review URL: https://chromiumcodereview.appspot.com/12303034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183498 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Android, after encountering an IO exception, the AccountManagerHelper method
to get the authentication token from foreground now retries when the network is
back.
BUG=165687
Review URL: https://chromiumcodereview.appspot.com/12091069
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180961 0039d316-1c4b-4281-b951-d872f2087c98
|
|
One of the long term goals of the sync team has been to pull sync out of
chrome_dll and into its own component. This should result in faster link
times for component builds, and cleaner demarcation between sync code
and the rest of chrome.
This patch does the following:
- Splits off sync.gyp into gypi files for sync_core, sync_api, sync_internal_api,
sync_notifier and sync_proto.
- Audits the dependencies of various targets in sync.gyp, sync_tests.gyp, and other
chrome gyp files, and makes sure all dependencies are explicitly declared.
- Makes targets declared in gyp files outside sync.gyp directly depend on
sync.gyp:sync instead of inner sync targets.
- Implements two versions of the target 'sync.gyp:sync':
1) In static mode, the public 'sync' target has a target type of 'none',
and is composed of the static library targets 'sync_api', 'sync_core',
'sync_internal_api', 'sync_notifier', and 'sync_proto'.
2) In component mode, we build the public 'sync' target into a single shared
library, which includes the contents of sync_api.gypi, sync_core.gypi,
sync_internal_api.gypi, sync_notifier.gypi, and sync_proto.gypi.
TBR=akalin,robertshield,thakis
BUG=136928
TEST=Set GYP_DEFINES="component=shared_library" and build the 'all' target on all platforms.
Review URL: https://codereview.chromium.org/11412211
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180034 0039d316-1c4b-4281-b951-d872f2087c98
|