| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change also fixes a bug where AddSyncedNotification
returned a binary-encoded string instead of ASCII.
Directions for triggering synced notifications in test server (Linux):
1) Build and run the test server:
ninja -C out/Debug run_sync_testserver
out/Debug/run_sync_testserver --port=1337
2) Run the browser against the test server:
google-chrome --enable-logging --enable-synced-notifications \
--sync-url=http://127.0.0.1:1337/chromiumsync
3) Go to browser settings. If you are already signed in, click
"Set up sync..." and hit OK on the subsequent dialog. Otherwise, sign in
and complete Sync setup.
4) Navigate to http://127.0.0.1:1337/syncednotifications and follow the
directions on the page.
BUG=248332
Review URL: https://codereview.chromium.org/100053007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239159 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
|
|
|
|
|
|
|
|
|
|
|
| |
base namespace.
BUG=
R=viettrungluu@chromium.org
Review URL: https://codereview.chromium.org/102843002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238465 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL appeared to be the cause of a link failure on Win dbg: http://goo.gl/PTFpFF
> Clean up TestProfileSyncService and related tests
>
> This CL refactors many of the tests in profile_sync_service_unittest.cc.
> It continues the refactoring work begun in r233533, r235661, and
> r235854.
>
> The JsController tests have been deleted. There is not much point in
> testing the JsController here; it can be more easily tested on its own
> in sync_js_controller_uniittest.cc. The SyncJsController unit tests
> have been updated so they now cover the few cases that were formerly
> only exercised in the ProfileSyncService unit tests.
>
> It converts all remaining uncoverted tests from relying on the
> TestProfileSyncService to using a real ProfileSyncService with an
> injected backend. The injected backend makes it easier to create the
> scenarios we want to test. We can inject a specially crafted SBH rather
> than fiddling with "synchronous init" and "fail initial download" flags.
>
> Since the TestProfileSyncService no longer needs to support the wide
> variety of test scenarios required by the tests in
> profile_sync_service_unittest.cc, we can greatly simplify its
> implementation. Many of its parameters and associated code have been
> removed.
>
> BUG=140354,312994
>
> Review URL: https://codereview.chromium.org/67683005
TBR=rlarocque@chromium.org
Review URL: https://codereview.chromium.org/98323003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238368 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL refactors many of the tests in profile_sync_service_unittest.cc.
It continues the refactoring work begun in r233533, r235661, and
r235854.
The JsController tests have been deleted. There is not much point in
testing the JsController here; it can be more easily tested on its own
in sync_js_controller_uniittest.cc. The SyncJsController unit tests
have been updated so they now cover the few cases that were formerly
only exercised in the ProfileSyncService unit tests.
It converts all remaining uncoverted tests from relying on the
TestProfileSyncService to using a real ProfileSyncService with an
injected backend. The injected backend makes it easier to create the
scenarios we want to test. We can inject a specially crafted SBH rather
than fiddling with "synchronous init" and "fail initial download" flags.
Since the TestProfileSyncService no longer needs to support the wide
variety of test scenarios required by the tests in
profile_sync_service_unittest.cc, we can greatly simplify its
implementation. Many of its parameters and associated code have been
removed.
BUG=140354,312994
Review URL: https://codereview.chromium.org/67683005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238348 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
|
|
|
|
|
|
|
|
| |
BUG=318439
Review URL: https://codereview.chromium.org/82303002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236914 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The first attempt at setting consistent invalidator IDs, r234524, has
turned out to be a failure. It was based on the assumption that the
InvalidationController was the only object that would start the
InvalidationService. That assumption was wrong.
This CL takes a new approach. Rather than having the
InvalidationController manage the ID and send it to the
InvalidationService, we now managed it in the
InvalidationClientNameProvider class, which is avialable to both the
InvalidationController and InvalidationService. This allows both
classes to synchronously request a client name as they need it.
The InvalidationClientNameProvider is, by default, backed by an
InvalidationClientNameGenerator that provides it with fully random IDs.
This is not ideal, but it's better than the other alternatives.
Once this change is fully implemented, the downstream code will invoke
UniqueIdInvalidationClientNameGenerator.doInitializeAndInstallGenerator()
during early init. This will initialize a
UniqueIdInvalidationClientNameGenerator with a
UuuidBasedUniqueIdentificationGenerator that will provide a consistent
identifier across restarts, and inject this
InvalidationClientNameGenerator into the InvalidationClientNameProvider.
BUG=320873
Review URL: https://codereview.chromium.org/77243002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236681 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
This CL also adds the option of changing the ClientCommand sent back to
the client in order to modify the commit delay for sessions. After this
change is submitted, a frontend will be added to allow easy triggering
of canned notifications.
Review URL: https://codereview.chromium.org/70933002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236619 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
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sync cycle might receive response from server that causes scheduler to
stop and draws pending_configure_params_ invalid. Check started_
before dereferencing pending_configure_params_ to avoid SEGFAULT.
BUG=320738
Review URL: https://codereview.chromium.org/62263003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236138 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This introduces AppListSyncableService, but does not implement any
syncing yet. The purpose is to move ownership of AppListModel so that
we can maintain and sync the model state independent of the view. It also
made sense to move ExtensionAppModelBuilder ownership to
AppListSyncableService.
This required a fair bit of (smallish) re-factoring. Here is a simplified
diagram that may help:
https://docs.google.com/a/google.com/drawings/d/1NgaQzdqddTh1W7altZ6P6t4dNxZDRO0e_HgJqa8V36A/edit
BUG=315887
For minor ash/shell/ changes:
R=jennyz@chromium.org, tapted@chromium.org, xiyuan@chromium.org
TBR=jamescook@chromium.org
Review URL: https://codereview.chromium.org/66023003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236020 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move following tests:
TestStartupWithOldSyncData
FailToOpenDatabase
FailToDownloadControlTypes
Remove redundant parameters from StartSyncServiceAndSetInitialSyncEnded
and remove StartSyncService function.
TestStartupWithOldSyncData goes to SyncBackendHost tests. It verifies that SyncBackendHost cleans Sync Data directory before initialization.
FailToOpenDatabase goes to SyncManagerImpl test. It verifies that if SyncManager fails to open database it reports initialization failure.
FailToDownloadControlTypes is already covered by SyncBackendHostTest.SilentlyFailToDownloadControlTypes
BUG=312994
Review URL: https://codereview.chromium.org/68483005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235854 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The idea of this change is to only call Do***SyncSessionJob from single
function TryJob and have all other functions in class call it. The hope
is that maybe someday we'll call it asynchronously.
Previously it would look like this:
http://www.plantuml.com/plantuml/svg/ZP5HJiCm38RVSue-0jAkW0JRa8OGJCquGDQuRKPg5pUTbjkJfXfQrzBnvlZ_REUtfLFiaiLZygGFRUEsPAt1GWYPbQ1R2s-KAVlUwWAIHQ3EwPZPLBKTWYda34sPmdSBZRjHiS6ZiaOhPmZd9eXHAe9Ru9ouMe5L7dJKnC14JuLuPohWfR9shx8lyOckP7BEzlDsx9SA5VjNselrgIO4T4RPvy1IdgVWs8_13vJ0nz2L427h7AoPYL_C2VIO5fUlAAyeLEQcQ3dQbnup2KqJmewVmAE_srXdzueIiZ_ntsry3LTBcGOdDZv3_vvjuFGVxiNePZFcPbl5khk7Up7vmmjrtFai_W00
Now it will look like this:
http://www.plantuml.com/plantuml/svg/XP5HJiGW48RVEKKVrMIlOAAxQxB6wARK0x1bsg9Jg5FOBBUNqbHRsTGtcE-3uH-u5MIppNts83zSRuy6KUcQCLus81t2Yoa5lZfPGxO9rbIEbKFRuLBCeIBecno-7FJsdnC7VHQefB3AwBKEB2b5yGXK6MftWCA3Z8mjGenMM1Ug1TeAn9CeFzcxjWqPQt7iLv3V2Yt8FviJsryweq5R9V0nkAQgSh3aK_5DSw1pkDLe3UMGO4zaw4bTGAOsc-ycF83Yjx8puQvArOxYGBZN9OU-3yj4Z5dNX27q7yxu-D6pthw3T1O3kJBPEVxvZyM35qOozGLTZHhDcxjRTZNdZAOX9_WD
The change should be roughly equivalent to today's behavior.
BUG=259913
Review URL: https://codereview.chromium.org/68013007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235814 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
Nobody calls it anyway.
Review URL: https://codereview.chromium.org/73623003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235696 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
ensure we don't lose debug info.
BUG=319463
Review URL: https://codereview.chromium.org/68893022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235654 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pass retry_task through ConfigurationParams to
SyncScheduler::ScheduleConfiguration. We might in the future do
configuration asynchronously and passing retry_task through asynchronous
calls will be handy.
SyncManagerTestWithMockScheduler.ConfigurationRetry is no longer needed,
SyncSchedulerTest.ConfigWithBackingOff tests this functionality.
BUG=259913
Review URL: https://codereview.chromium.org/62283011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235541 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refactor the ApplyControlDataUpdates and Download unit tests to no
longer depend on SyncerCommand and related concepts, including
ModelSafeRoutingInfo, SyncSession, and SyncSessionContext.
The refactoring required rewriting some non-test code to expose new or
different signatures. These changes should have no effect on non-test
behavior.
This CL also removes a useless field from the StatusController.
Removing that field made the refactoring of download.cc a bit easier.
These changes prepare for a refactoring that will remove
ModelChangingSyncerCommand. This is one more step on the path to hiding
threading details from the sync engine.
BUG=278484
Review URL: https://codereview.chromium.org/53763002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235401 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Drop support for legacy UniquePosition encoding.
Some old clients (M28 and M29) only understand the uncompressed and gzip
encodings of UniquePositions. To maintain compatibility with them,
clients that supported the newer and better custom compression algorithm
(M30 and above) wrote protobufs that contained both the old and new
encodings.
Maintaining backwards compatibility in this way is expensive. It's not
a big deal for clients that have a reasonable number of bookmarks, but
for the few users that have thousands of them this could be a real
problem.
Since those old clients are now much rarer, it should be safe to no
longer write the extra encoding just for them. If any of those older
clients do come across protobufs that are newer than what they support,
they will fail to apply the position updates. In other words, bookmarks
modified on newer clients will have randomly assigned positions on older
clients. Those older clients will also run over a NOTREACHED(), but I
don't think this will do any harm in practice.
BUG=260394
Review URL: https://codereview.chromium.org/68533007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235380 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
|
|
|
|
|
|
|
|
|
|
|
| |
SQLite allocates more than 1MB cache for the DB. We should limit
the cache size to a few hundred KBs like other tables.
BUG=280909
Review URL: https://codereview.chromium.org/66413006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234900 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
SyncContentResolverDelegate.
The relevant CL where renaming was done: https://chromiumcodereview.appspot.com/11929040/
Review URL: https://codereview.chromium.org/59883009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234816 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=317523
Review URL: https://codereview.chromium.org/63623003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234804 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow the Java side of the Andorid invalidations implementation to share
its client ID with its associated C++ classes.
The InvalidationController class will prefer to use an ID from a provided
UniqueIdentificationGeneratorFactory. This ID would have the advantage of
persisting across restarts, which is necessary to ensure effective reflection
blocking.
If the UniqueIdentificationGeneratorFactory has not been provided, as may be
the case in tests, the InvalidationController will generate its own temporary
ID. This will effectievely disable reflection blocking, but it's better than
returning a consistent ID (since that would risk blocking notifications that we
actually need). This randomly generated ID is not much different from the
randomly generated ID created by the InvalidationService prior to this CL.
At the time of this writing, the code to set up the
UniqueIDGeneratorFactory is not in place. This will be added in a later
commit. Until then, reflection blocking will remain broken.
BUG=172391
Review URL: https://codereview.chromium.org/54923003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234524 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In case like server outage/bug, sync backend can receive same invalid
token in a row and stay in auth error state without frontend knowing
it. This change makes backend report auth error again if this happens.
Frontend will request token again but also use exponetial backoff to
protect againest hammering token server too often.
BUG=311420
Review URL: https://codereview.chromium.org/62423002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233938 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
Both OAuth2TokenService and ProfileSyncService will now retry on HTTP 500s. Note that ProfileSyncService retries will only kick in if OA2TS gives up after a fixed number of attempts.
BUG=311420
Review URL: https://codereview.chromium.org/61833003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233908 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Some differences to account for ExtensionService's sync handling moving to ExtensionSyncService.
BUG=303311,316368
TBR=zea@chromium.org
Review URL: https://codereview.chromium.org/65983002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233885 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The information includes server connection status, token
request/response time, error message and next scheduled request time
if in exponential backoff state.
BUG=309103,311414
NOTRY=true
Review URL: https://codereview.chromium.org/60703002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233665 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
When initializing invalidator pass parameter that says that token is
OAuth2 access token.
Review URL: https://codereview.chromium.org/54353005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233289 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL adds a new handler to the python sync server so it can serve
fake OAuth2 tokens to chrome. It is meant to be used for manual testing
with the python sync server, using the workflow described below:
- Build the "run_sync_testserver" target.
- Run the python sync server: "out/Debug/run_sync_testserver --port=8010"
- Launch chrome, sign in, and set up sync
- Re-launch chrome with "--lso-url=http://127.0.0.1:8010"
Chrome will now fetch OAuth2 tokens from the fake gaia server.
You may change the fake OAuth2 token returned by the python sync server
on the fly via the setfakeoauth2token handler like so:
http://127.0.0.1:8010/setfakeoauth2token?response_code=200&expires_in=2400&request_token=rt&access_token=at&token_type=Bearer
You may skip or include any of the query params. Params that are skipped
will remain unchanged.
BUG=none
TEST=Build and run the "run_sync_testserver" target. Test the /o/oauth2/token and /setfakeoauth2token handlers.
R=pavely@chromium.org
Review URL: https://codereview.chromium.org/58093002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233271 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove InvalidationController from its old location. This completes the
move that was started in r231232.
The downstream code has been updated to point to the
InvalidationController in its new location. Now that the class defined
in the old location is completely unused, we can safely remove it.
BUG=172391
Review URL: https://codereview.chromium.org/49833004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231975 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
* SyncStatusHelper now updates observers whenever cached contents
changes, previously only updated on content resolver notifications.
BUG=299123
Review URL: https://codereview.chromium.org/26116009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231960 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
|
|
|
|
|
|
|
|
| |
BUG=126732
Review URL: https://codereview.chromium.org/32043003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231396 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the InvalidationController Java class from sync/notifier to
chrome/browser/invalidation. Move its IntentProtocol inner class into
its own class, InvalidationIntentProtocol, and keep it in sync/notifier.
In order to prevent this change from breaking the downstream build, a
reduced version of InvalidationController has been left behind in the
old location. The second part of this patch will remove it.
An unfortunate side effect of having two InvalidationControllers is that
they may be double-notified when the when the activity state changes,
and this may cause the start or stop signals to be sent to the
InvalidationService twice. This is wasteful, but otherwise mostly
harmless.
TBR=jhawkins
BUG=172391
Review URL: https://codereview.chromium.org/45103003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231232 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=303311
Review URL: https://codereview.chromium.org/30223003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231221 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL is followup after https://codereview.chromium.org/22342003/
I've removed references to GaiaConstants::kSyncService from
ProfileSyncService unittests, SyncBackendHost and ProfileSyncService.java
There are still references in TokenService, TokenService unittests and
chrome/browser/chromeos/login/online_attempt.cc. The last one should not
block TokenService migration as it doesn't refer TokenService, but
I don't understand that code so decided not to change it.
Review URL: https://codereview.chromium.org/31213004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230899 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the invalidations system is not working or has been not working for
some time in the recent past, we should not allow the syncer to skip
making the "LOCAL" request for updates prior to each commit request.
Currently, all pre-commit update avoidance is hidden behind a flag, so
this change will have no effect on normal users.
BUG=309815
Review URL: https://codereview.chromium.org/33723003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230639 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
|
|
|
|
|
|
|
|
|
|
|
| |
Part of a bigger change that can be seen here for context
https://codereview.chromium.org/27311005/
BUG=308421
Review URL: https://codereview.chromium.org/26880007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230400 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
Switch sync to always use OAuth2 tokens and remove corresponding flags
and command line switch.
Review URL: https://codereview.chromium.org/22342003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230343 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Define a new function for partitioning an update response into per-type
chunks and use it to refactor ProcessUpdateCommand's functions.
This is part of the preparation to move towards maintaining a set of
per-type objects that we can use to process updates in different ways
for different types.
This commit also updates the GetModelTypeFromSpecifics() so it no longer
reports the type of deleted items as "UNSPECIFIED". The old behavior
was implemented in a time when the server would not set the type of
tombstone items. The current server will always populate that
information.
BUG=278484
Review URL: https://codereview.chromium.org/27765002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230266 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some Java code checks to see whether Chrome is in the foreground when
it should really be checking if the Application's top Activity is
visible for scenarios where a little popup partially covers Chrome.
Add a method to make the check more explicit, then change obvious places
that do checks on whether Chrome is running to use the new function.
Precursor to https://gerrit-int.chromium.org/#/c/45073/
BUG=308211
R=nyquist@chromium.org, tedchoc@chromium.org, yfriedman@chromium.org
Review URL: https://codereview.chromium.org/27509007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@229172 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
R=yfriedman
BUG=
Review URL: https://codereview.chromium.org/24795004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228834 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
These methods are no longer used.
TBR=nyquist
Review URL: https://codereview.chromium.org/26155005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228811 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
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also adds a test to ensure the sync status observer behaves correctly.
Depends on: https://codereview.chromium.org/23686014/
BUG=272584
Review URL: https://codereview.chromium.org/23450036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228237 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=303818
R=akalin@chromium.org, nhiroki@chromium.org
TBR=nhiroki@chromium.org
Review URL: https://codereview.chromium.org/26594002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227944 0039d316-1c4b-4281-b951-d872f2087c98
|