| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
This change is being made so that Sync integration tests can eventually
use an in-process, C++ fake server.
BUG=323265
Review URL: https://codereview.chromium.org/73723006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239636 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
|
| |
Download and associate high-priority types (control types, priority preference and managed users for now) before other types.
BUG=236456
Review URL: https://chromiumcodereview.appspot.com/15067016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203486 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds gzip support to UniquePosition encoding. The client
may choose to leave the value uncompressed, or to run the value through
gzip. It is currently configured to use gzip only when the uncompressed
value has a length greater than or equal to 128 bytes.
We've seen some UniquePositions grow to inconveniently large lengths.
These large positions are expensive to store and transmit, and, if they
grow large enough, might start to cause commit failures.
Fortunately, long UniquePosition values tend to contain a lot of
reundancy. A common pattern is long strings of 0xFF or 0x00 digits. I
expect that gzip will do a very good job of compressing long positions,
to the point where large positions are no longer a problem.
Since this is the first use of zlib within sync, this CL includes
adjustments to DEPS and .gyp files to declare the new dependency.
Clients that support this feature may start writing position values that
can't be decoded by older clients. The older clients will silently
discard position updates delivered in a format they can't understand.
Fortunately, the UniquePosition code hasn't left dev channel yet, and
only a small minority of users have these large bookmarks, so the impact
should be very limited.
BUG=145412
Review URL: https://chromiumcodereview.appspot.com/14348038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195608 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The XP bots are still red, and it's still whining about URL.DLL
> Lets try this again.
>
> Revert 193983 "Revert 193968 "Roll the DEPS for google-url.""
>
> > Revert 193968 "Roll the DEPS for google-url."
> >
> > > Roll the DEPS for google-url.
> > >
> > > And update all the references from build/temp_gyp/googleurl.gyp to url/url.gyp.
> > >
> > > This also changes googleurl.gyp to reference the files under url/, so that we
> > > don't break the Blink tree.
> > >
> > > BUG=229660
> > > R=brettw@chromium.org
> > > TBR=brettw@chromium.org
> > >
> > > Review URL: https://chromiumcodereview.appspot.com/14089011
> >
> > TBR=tfarina@chromium.org
> > Review URL: https://codereview.chromium.org/14028012
>
> TBR=michaeln@google.com
> Review URL: https://codereview.chromium.org/14109014
TBR=michaeln@google.com
Review URL: https://codereview.chromium.org/14263002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194151 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Revert 193983 "Revert 193968 "Roll the DEPS for google-url.""
> Revert 193968 "Roll the DEPS for google-url."
>
> > Roll the DEPS for google-url.
> >
> > And update all the references from build/temp_gyp/googleurl.gyp to url/url.gyp.
> >
> > This also changes googleurl.gyp to reference the files under url/, so that we
> > don't break the Blink tree.
> >
> > BUG=229660
> > R=brettw@chromium.org
> > TBR=brettw@chromium.org
> >
> > Review URL: https://chromiumcodereview.appspot.com/14089011
>
> TBR=tfarina@chromium.org
> Review URL: https://codereview.chromium.org/14028012
TBR=michaeln@google.com
Review URL: https://codereview.chromium.org/14109014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193992 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
> Roll the DEPS for google-url.
>
> And update all the references from build/temp_gyp/googleurl.gyp to url/url.gyp.
>
> This also changes googleurl.gyp to reference the files under url/, so that we
> don't break the Blink tree.
>
> BUG=229660
> R=brettw@chromium.org
> TBR=brettw@chromium.org
>
> Review URL: https://chromiumcodereview.appspot.com/14089011
TBR=tfarina@chromium.org
Review URL: https://codereview.chromium.org/14028012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193983 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
And update all the references from build/temp_gyp/googleurl.gyp to url/url.gyp.
This also changes googleurl.gyp to reference the files under url/, so that we
don't break the Blink tree.
BUG=229660
R=brettw@chromium.org
TBR=brettw@chromium.org
Review URL: https://chromiumcodereview.appspot.com/14089011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193968 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
|