| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As of r237421, the invalidations system now supports a new and improved
form of local acknowledgements. Any invalidations not explicitly
dropped or acknowledged will be redelivered after a restart.
This CL makes use of the new functionality in sync. It uses the
DataTypeTrackers to track the status of pending invalidations and
acknowledge or drop invalidations as appropriate.
Also notable in this CL is that the 'server_dropped_hints' flag has now
been uncommented in the sync protocol. We've known for a long time that
we wanted to support such a flag, but haven't been able to implement it
correctly until now.
BUG=78462,233437
Review URL: https://codereview.chromium.org/102353005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241170 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of calling sync cycle directly TrySyncSessionJob posts task on
sync thread.
Rescheduling exponential backoff timer had to be moved from TryCanaryJob
into TrySyncSessionJobImpl because it analyzes result of sync cycle.
The same with setting do_poll_after_credentials_updated_ after auth_error.
Tests needed additional PumpLoop because of additional Post call.
BUG=259913
Review URL: https://codereview.chromium.org/114123004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240949 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change increases timeout values when running under tools
like AddressSanitizer and Valgrind.
TEST=ASan/Android FYI bot should become a bit greener
BUG=325685
R=bulach@chromium.org, mkosiba@chromium.org, mnaganov@chromium.org, yfriedman@chromium.org
Review URL: https://codereview.chromium.org/99253008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240598 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=320711
NOTRY=true
Review URL: https://codereview.chromium.org/111933005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240260 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The JSONReader only accepts UTF-8 input strings and converts \uXXXX sequences
back into UTF-8. However, the JSONWriter converts all non-ASCII characters to
UTF-16 escape sequences. This round-tripping is sub-optimal, as noted in a
TODO from r54359.
One reason for this may be that JsonDoubleQuote(), used by JSONWriter, does not
handle UTF-8 bytes correctly, interpreting them as code points and writing them
out as \u00XX sequences. If this were read back through a RFC-compliant JSON
parser, the result would be an invalid encoding error. JsonDoubleQuote() does
handle UTF-16 correctly, though.
This rewrites the base/json/string_escape.h API and fixes the above UTF-8 issue
by dividing callers up into three groups:
1. Those that pass valid UTF-8 to be escaped. Prior to this change, very few
callers used this variant. Those that did were likely using ASCII, otherwise
the output would be mangled due to the above issue. Now, valid UTF-8 will be
passed through to the output unescaped. Invalid UTF-8 sequences are replaced
with U+FFFD.
2. Those that pass valid UTF-16 to be escaped. This function now validates that
the input is valid UTF-16, and then converts it to unescaped UTF-8 sequences
for the output.
3. Those that pass arbitrary byte arrays as std::string and expect a non-RFC-
compliant encoding of the binary data using \uXXXX escapes. This behavior is
now in the EscapeBytesAsInvalidJSONString() function. It is only used by
callers who want a "debug string" but do not expect to actually parse the
output as valid JSON, since it is not.
Additionally, this removes the JSONWriter::OPTIONS_DO_NOT_ESCAPE flag, since
the writer can now handle UTF-8 appropriately.
BUG=15466
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=239800
Reverted: https://src.chromium.org/viewvc/chrome?view=rev&revision=240082
R=asanka@chromium.org, bauerb@chromium.org, mark@chromium.org, thakis@chromium.org, zea@chromium.org
Review URL: https://codereview.chromium.org/100823007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240190 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL introduces the AppList sync type.
As of patchset #7 this CL depends on https://codereview.chromium.org/106033003/
BUG=313376
Review URL: https://codereview.chromium.org/78773004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240162 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reason for revert: This patchset breaks at least displayment of Russian localized strings on Chromeos login screen.
TBR=mark@chromium.org,jshin@chromium.org,thakis@chromium.org,asanka@chromium.org,zea@chromium.org,bauerb@chromium.org,rsesek@chromium.org
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/106793004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240082 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*****************
Reverting the revert. Congrats, the original CL wasn't the cause for the failure; sorry for the mess.
*****************
> Revert 239759 "The comment in base64.h implies that base::Base64..."
>
> > The comment in base64.h implies that base::Base64Encode() can return false, but
> > this cannot happen in practice. Fix the comment.
> >
> > The implementation of Base64Encode() attempts to check for the return value
> > MODP_B64_ERROR as a failure, but modp_b64_encode() cannot return this
> > value. Remove the check.
> >
> > Remove unneeded integer cast.
> >
> > Change the return type to void.
> >
> > BUG=323357
> > TEST=base_unittests, compile all
> > TBR=jochen@chromium.org,miket@chromium.org,joi@chromium.org,akalin@chromium.org,sergeyu@chromium.org
> >
> > Review URL: https://codereview.chromium.org/86913002
>
> TBR=ricea@chromium.org
>
> Review URL: https://codereview.chromium.org/101113004
TBR=vadimt@chromium.org
Review URL: https://codereview.chromium.org/111883004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239944 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
> The comment in base64.h implies that base::Base64Encode() can return false, but
> this cannot happen in practice. Fix the comment.
>
> The implementation of Base64Encode() attempts to check for the return value
> MODP_B64_ERROR as a failure, but modp_b64_encode() cannot return this
> value. Remove the check.
>
> Remove unneeded integer cast.
>
> Change the return type to void.
>
> BUG=323357
> TEST=base_unittests, compile all
> TBR=jochen@chromium.org,miket@chromium.org,joi@chromium.org,akalin@chromium.org,sergeyu@chromium.org
>
> Review URL: https://codereview.chromium.org/86913002
TBR=ricea@chromium.org
Review URL: https://codereview.chromium.org/101113004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239921 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a follow-up to r238532. I had wanted to implement this change
with that CL, but decided it would be easier to split them up into
independent changes.
This refactoring pulls the GetUpdates looping logic out of the
StatusController. It was implemented that way in a time when the only
way to pass state between different parts of the sync cycle was through
a shared SyncSession and its members. Now that this is no longer the
case, we can keep the "should continue looping" logic more or less local
to the code that performs the looping.
The change allows us to remove the updates response message proto member
out of the StatusController. That could save us a small amount of time,
since copying protos can be somewhat expensive. More importantly, it
reduces complexity, since we no longer need to worry about the effects
of state stored in the StatusController. The StatusController is now
used only to collect some counts for debugging.
This has already uncovered a bug. There was a unit test that failed to
reset its SyncSession in the same manner that it would have been reset
in a non-test scenario. It depended on the state that was "leaked" from
one sync cycle to the next via the unreset SyncSession in order to meet
its test expectations.
BUG=278484
Review URL: https://codereview.chromium.org/104653003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239905 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=320711
TBR=isherman@chromium.org
NOTRY=true
Review URL: https://codereview.chromium.org/110963003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239823 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The JSONReader only accepts UTF-8 input strings and converts \uXXXX sequences
back into UTF-8. However, the JSONWriter converts all non-ASCII characters to
UTF-16 escape sequences. This round-tripping is sub-optimal, as noted in a
TODO from r54359.
One reason for this may be that JsonDoubleQuote(), used by JSONWriter, does not
handle UTF-8 bytes correctly, interpreting them as code points and writing them
out as \u00XX sequences. If this were read back through a RFC-compliant JSON
parser, the result would be an invalid encoding error. JsonDoubleQuote() does
handle UTF-16 correctly, though.
This rewrites the base/json/string_escape.h API and fixes the above UTF-8 issue
by dividing callers up into three groups:
1. Those that pass valid UTF-8 to be escaped. Prior to this change, very few
callers used this variant. Those that did were likely using ASCII, otherwise
the output would be mangled due to the above issue. Now, valid UTF-8 will be
passed through to the output unescaped. Invalid UTF-8 sequences are replaced
with U+FFFD.
2. Those that pass valid UTF-16 to be escaped. This function now validates that
the input is valid UTF-16, and then converts it to unescaped UTF-8 sequences
for the output.
3. Those that pass arbitrary byte arrays as std::string and expect a non-RFC-
compliant encoding of the binary data using \uXXXX escapes. This behavior is
now in the EscapeBytesAsInvalidJSONString() function. It is only used by
callers who want a "debug string" but do not expect to actually parse the
output as valid JSON, since it is not.
Additionally, this removes the JSONWriter::OPTIONS_DO_NOT_ESCAPE flag, since
the writer can now handle UTF-8 appropriately.
BUG=15466
Review URL: https://codereview.chromium.org/100823007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239800 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
this cannot happen in practice. Fix the comment.
The implementation of Base64Encode() attempts to check for the return value
MODP_B64_ERROR as a failure, but modp_b64_encode() cannot return this
value. Remove the check.
Remove unneeded integer cast.
Change the return type to void.
BUG=323357
TEST=base_unittests, compile all
TBR=jochen@chromium.org,miket@chromium.org,joi@chromium.org,akalin@chromium.org,sergeyu@chromium.org
Review URL: https://codereview.chromium.org/86913002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239759 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Didn't help.
> Revert 239615 "Retry: Clean up TestProfileSyncService tests"
>
> Failed on CrOS:
>
> http://build.chromium.org/p/chromium.chromiumos/builders/ChromiumOS%20%28x86%29/builds/18496/steps/BuildPackages/logs/stdio
>
> chromeos-chrome-33.0.1734.0_alpha-r1: sync/protocol/proto_value_conversions.cc:417:11: error: 'MetaInfo' in namespace 'sync_pb' does not name a type
> chromeos-chrome-33.0.1734.0_alpha-r1: const sync_pb::MetaInfo& proto) {
> chromeos-chrome-33.0.1734.0_alpha-r1: ^
> chromeos-chrome-33.0.1734.0_alpha-r1: sync/protocol/proto_value_conversions.cc:417:30: error: ISO C++ forbids declaration of 'proto' with no type [-fpermissive]
> chromeos-chrome-33.0.1734.0_alpha-r1: const sync_pb::MetaInfo& proto) {
> chromeos-chrome-33.0.1734.0_alpha-r1: ^
> chromeos-chrome-33.0.1734.0_alpha-r1: sync/protocol/proto_value_conversions.cc: In function 'base::DictionaryValue* syncer::MetaInfoToValue(const int&)':
> chromeos-chrome-33.0.1734.0_alpha-r1: sync/protocol/proto_value_conversions.cc:419:13: error: request for member 'has_key' in 'proto', which is of non-class type 'const int'
> chromeos-chrome-33.0.1734.0_alpha-r1: SET_STR(key);
> chromeos-chrome-33.0.1734.0_alpha-r1: ^
> chromeos-chrome-33.0.1734.0_alpha-r1: sync/protocol/proto_value_conversions.cc:419:72: error: request for member 'key' in 'proto', which is of non-class type 'const int'
> chromeos-chrome-33.0.1734.0_alpha-r1: SET_STR(key);
> chromeos-chrome-33.0.1734.0_alpha-r1: ^
> chromeos-chrome-33.0.1734.0_alpha-r1: sync/protocol/proto_value_conversions.cc:420:13: error: request for member 'has_value' in 'proto', which is of non-class type 'const int'
> chromeos-chrome-33.0.1734.0_alpha-r1: SET_STR(value);
> chromeos-chrome-33.0.1734.0_alpha-r1: ^
> chromeos-chrome-33.0.1734.0_alpha-r1: sync/protocol/proto_value_conversions.cc:420:76: error: request for member 'value' in 'proto', which is of non-class type 'const int'
> chromeos-chrome-33.0.1734.0_alpha-r1: SET_STR(value);
> chromeos-chrome-33.0.1734.0_alpha-r1: ^
> chromeos-chrome-33.0.1734.0_alpha-r1: sync/protocol/proto_value_conversions.cc: In function 'base::DictionaryValue* syncer::BookmarkSpecificsToValue(const sync_pb::BookmarkSpecifics&)':
> chromeos-chrome-33.0.1734.0_alpha-r1: sync/protocol/proto_value_conversions.cc:432:51: error: 'const class sync_pb::BookmarkSpecifics' has no member named 'meta_info'
> chromeos-chrome-33.0.1734.0_alpha-r1: SET_REP(meta_info, &MetaInfoToValue);
> chromeos-chrome-33.0.1734.0_alpha-r1: ^
> chromeos-chrome-33.0.1734.0_alpha-r1: make: *** [c/Release/obj.target/sync_core/sync/protocol/proto_value_conversions.o] Error 1
> chromeos-chrome-33.0.1734.0_alpha-r1: make: *** Waiting for unfinished jobs....
> chromeos-chrome-33.0.1734.0_alpha-r1: * ERROR: chromeos-base/chromeos-chrome-33.0.1734.0_alpha-r1 failed (compile phase):
> chromeos-chrome-33.0.1734.0_alpha-r1: * emake failed
> chromeos-chrome-33.0.1734.0_alpha-r1: *
>
> > Retry: Clean up TestProfileSyncService tests
> >
> > This is a retry of r238348, which was reverted in r238368. I believe
> > the build failure that led to the revert, though related to my change,
> > was a flake caused by stale object files on the build bot.
> >
> > 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/102513002
>
> TBR=rlarocque@chromium.org
>
> Review URL: https://codereview.chromium.org/110993003
TBR=scottmg@chromium.org
Review URL: https://codereview.chromium.org/111183003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239643 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Failed on CrOS:
http://build.chromium.org/p/chromium.chromiumos/builders/ChromiumOS%20%28x86%29/builds/18496/steps/BuildPackages/logs/stdio
chromeos-chrome-33.0.1734.0_alpha-r1: sync/protocol/proto_value_conversions.cc:417:11: error: 'MetaInfo' in namespace 'sync_pb' does not name a type
chromeos-chrome-33.0.1734.0_alpha-r1: const sync_pb::MetaInfo& proto) {
chromeos-chrome-33.0.1734.0_alpha-r1: ^
chromeos-chrome-33.0.1734.0_alpha-r1: sync/protocol/proto_value_conversions.cc:417:30: error: ISO C++ forbids declaration of 'proto' with no type [-fpermissive]
chromeos-chrome-33.0.1734.0_alpha-r1: const sync_pb::MetaInfo& proto) {
chromeos-chrome-33.0.1734.0_alpha-r1: ^
chromeos-chrome-33.0.1734.0_alpha-r1: sync/protocol/proto_value_conversions.cc: In function 'base::DictionaryValue* syncer::MetaInfoToValue(const int&)':
chromeos-chrome-33.0.1734.0_alpha-r1: sync/protocol/proto_value_conversions.cc:419:13: error: request for member 'has_key' in 'proto', which is of non-class type 'const int'
chromeos-chrome-33.0.1734.0_alpha-r1: SET_STR(key);
chromeos-chrome-33.0.1734.0_alpha-r1: ^
chromeos-chrome-33.0.1734.0_alpha-r1: sync/protocol/proto_value_conversions.cc:419:72: error: request for member 'key' in 'proto', which is of non-class type 'const int'
chromeos-chrome-33.0.1734.0_alpha-r1: SET_STR(key);
chromeos-chrome-33.0.1734.0_alpha-r1: ^
chromeos-chrome-33.0.1734.0_alpha-r1: sync/protocol/proto_value_conversions.cc:420:13: error: request for member 'has_value' in 'proto', which is of non-class type 'const int'
chromeos-chrome-33.0.1734.0_alpha-r1: SET_STR(value);
chromeos-chrome-33.0.1734.0_alpha-r1: ^
chromeos-chrome-33.0.1734.0_alpha-r1: sync/protocol/proto_value_conversions.cc:420:76: error: request for member 'value' in 'proto', which is of non-class type 'const int'
chromeos-chrome-33.0.1734.0_alpha-r1: SET_STR(value);
chromeos-chrome-33.0.1734.0_alpha-r1: ^
chromeos-chrome-33.0.1734.0_alpha-r1: sync/protocol/proto_value_conversions.cc: In function 'base::DictionaryValue* syncer::BookmarkSpecificsToValue(const sync_pb::BookmarkSpecifics&)':
chromeos-chrome-33.0.1734.0_alpha-r1: sync/protocol/proto_value_conversions.cc:432:51: error: 'const class sync_pb::BookmarkSpecifics' has no member named 'meta_info'
chromeos-chrome-33.0.1734.0_alpha-r1: SET_REP(meta_info, &MetaInfoToValue);
chromeos-chrome-33.0.1734.0_alpha-r1: ^
chromeos-chrome-33.0.1734.0_alpha-r1: make: *** [c/Release/obj.target/sync_core/sync/protocol/proto_value_conversions.o] Error 1
chromeos-chrome-33.0.1734.0_alpha-r1: make: *** Waiting for unfinished jobs....
chromeos-chrome-33.0.1734.0_alpha-r1: * ERROR: chromeos-base/chromeos-chrome-33.0.1734.0_alpha-r1 failed (compile phase):
chromeos-chrome-33.0.1734.0_alpha-r1: * emake failed
chromeos-chrome-33.0.1734.0_alpha-r1: *
> Retry: Clean up TestProfileSyncService tests
>
> This is a retry of r238348, which was reverted in r238368. I believe
> the build failure that led to the revert, though related to my change,
> was a flake caused by stale object files on the build bot.
>
> 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/102513002
TBR=rlarocque@chromium.org
Review URL: https://codereview.chromium.org/110993003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239635 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a retry of r238348, which was reverted in r238368. I believe
the build failure that led to the revert, though related to my change,
was a flake caused by stale object files on the build bot.
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/102513002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239615 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Add a meta info field to the bookmark sync proto so that meta info is
preserved when syncing bookmark nodes.
BUG=312488
Review URL: https://codereview.chromium.org/106053002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239314 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move code responsible for working with invalidations library out of
PushClientChannel into SyncNetworkChannel. PushClientChannel only has
code related to PushClient.
Create PushClient independent SyncNetworkChannel::Observer interface and
make SyncInvalidationListener observe it instead of PushClientObserver.
Move ownership of PushClientChannel from SyncSystemResources to
SyncInvalidationListener.
Tests for PushClientChannel are still in push_client_channel_unittest.cc.
I'll split those in subsequent patch.
BUG=325020
Review URL: https://codereview.chromium.org/103223004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239176 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|