| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL removes the incorrect setting of server_defined_unique_tag
for SyncedNotification entries in the Sync Python test server. Only one
of the client/server tags should be set.
Two other no-op changes were also made in the server (fix documentation
and indentation).
BUG=248332
Review URL: https://codereview.chromium.org/152143004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249766 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
normal and restored synced navigations.
BUG=340464
Review URL: https://codereview.chromium.org/152233003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249526 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The unthrottle timer callback uses a subtle trick to make the effects of
the timeout the same regardless of when it fires. This was intended to
eliminate the small chance of a harmless race condition.
The trick went wrong when I used the 'scheduled timeout' time rather
than 'now' to calculate when the next timeout should fire. The
unthrottle timeouts are supposed to be absolute times, so the distance
from it should be calculated relative to 'now'.
BUG=332241
Review URL: https://codereview.chromium.org/147493002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249303 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The sync settings notification code only fires a notification when the
account level sync setting changes. When only MasterSyncAutomatically
changes the code fails to fire a notification, correct the behavior.
BUG=340911
R=nyquist@chromium.org
Review URL: https://codereview.chromium.org/155573002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249225 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
scaleTimeout.
NOTRY=true
Review URL: https://codereview.chromium.org/143803017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249177 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
some forthcoming unit tests. AttachmentStore will likely change a lot in a future CL.
Renamed SyncAttachment to Attachment.
Renamed SyncAttachmentId to AttachmentId.
Added CreateId method to Attachment.
BUG=
Review URL: https://codereview.chromium.org/104813004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249160 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL allows the sync scheduler to make decisions about whether
updates should be applied directly from the sync thread (GROUP_PASSIVE)
or if the work should be delegated to the model thread. This means
that the sync backend no longer needs access to the routing info.
In a way, this feature is nothing new. It would have been wrong for the
scheduler to have non-GROUP_PASSIVE routing info when it's in configure
mode, and equally wrong for it to have types in GROUP_PASSIVE when in
normal mode (with the exception of a few control types). This CL trims
redundant information from the system.
BUG=278484,336616
Review URL: https://codereview.chromium.org/145993004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249138 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The old version of the test had a bug and was racy. If we hit a certain
code path, we would never unregister the CancelationSignal's observer,
which would result in a DCHECK. Because the code was racy, we didn't
hit that code path very often.
This CL includes two changes. First, it makes the test less racy. It
ensures that we always hit the more interesting code path. It also
fixes the bug so that hitting that code path no longer results in a
DCHECK failure.
BUG=340360
Review URL: https://codereview.chromium.org/144313016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249134 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
When Register fails with transient erro retry with exponential backoff.
BUG=335670
Review URL: https://codereview.chromium.org/144383008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248872 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For reasons described in crbug.com/338016, I changed my mind on explicit
time tracking. This is an attempt to clean up my mistake.
This new approach has the NudgeTracker keep track of the time when the
next retry GU is scheduled, and a flag that is set to true when we
should perform a retry GU at the next possible opportunity. Before a
sync cycle, the NudgeTracker is provided with a TimeTicks::Now() value
and asked to update the flag accordingly.
This does a better job of ensuring the value of
NudgeTracker::IsRetryRequired() is consistent. After this CL, we can
guarantee that its value will be the same before, during, and after the
sync cycle. The previous implementation relied on a call to
TimeTicks::Now() in download.cc, so it did not have this property.
There is one tricky part to this patch. We need to be careful that we
the call to RecordSuccessfulSyncCycle() after a sync cycle does not
overwrite pending retry state that may have been set by that sync
cycle's SyncSessionDelegate::OnReceivedRetryDelay() function. To avoid
that problem, we store the value from that call in the SyncScheduler and
act on it only after we've updated the NudgeTracker's state when the
sync cycle is complete.
BUG=338016
Review URL: https://codereview.chromium.org/146113003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248611 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recent flake:
http://build.chromium.org/p/chromium.mac/builders/iOS%20Simulator%20%28dbg%29/builds/15075
Flakiness dashboard:
http://chromium-build-logs.appspot.com/gtest_query?gtest_query=CancelationSignalTest.Cancel
BUG=340360
TEST=none
R=erg@chromium.org
TBR=rlarocque@chromium.org
NOTRY=true
Review URL: https://codereview.chromium.org/148613010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248569 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It seems to be causing sync to fail for the official build on a fresh directory.
> Use the proper name for the app info protobuf to mach the sync server
>
> BUG=339094
>
> Review URL: https://codereview.chromium.org/149723003
TBR=petewil@chromium.org
Review URL: https://codereview.chromium.org/153113002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248568 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
sync datatype is enabled.
Also remove some boilerplate code that is not needed.
BUG=316168
Review URL: https://codereview.chromium.org/142473005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248470 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL creates the sync_driver component and moves files with no problematic
dependencies from //chrome/browser/sync and //chrome/browser/sync/glue into it.
This is a first step toward componentization of //chrome/browser/sync.
BUG=339727
Review URL: https://codereview.chromium.org/133343007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248192 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=160586
TBR=finnur, ajuma, thakis, atwilson
Review URL: https://codereview.chromium.org/131503015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247922 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=339094
Review URL: https://codereview.chromium.org/149723003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247831 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Core types don't respect off by default state yet.
TBR=petewil@chromium.org
BUG=339094, 280266
Review URL: https://codereview.chromium.org/146913004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247759 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
This is the first checkin for creating a new sync datatype for the synced notifications app info. The new datatype will be used for synced notification metadata such as the name and icon of the service sending the synced notification.
BUG=280266
Review URL: https://codereview.chromium.org/143973006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247551 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change implements sending client-to-server messages in
GCMNetworkChannel. Implementation mimics what android implementation is
doing. To send message to server GCMNetworkChannel needs GCM
registration Id and access token. Registration Id is requested during
initialization and doesn’t change through process lifetime. Access token
is requested for every message. Errors are not handled,
cacheinvalidations will retry sending message if it doesn’t see
confirmation from server that the message was received. The only handled
error is HTTP_UNAUTHORIZED from tango server since access token needs to
be invalidated in this case.
Actual work of requesting registration id and access token is delegated
to GCMNetworkChannelDelegate interface. Implementation of this interface
will live in chrome/browser/invalidation directory and will use
GCMProfileService for registration and ProfileOAuth2TokenService for
token functions.
There are two things that are still not implemented:
- Register error handling: will need to implement retry.
- Building url for tango endpoint: this involves preparing and base64
encoding NetworkEndpointId protobuf from cacheinvalidations library.
Will address both in next CL.
BUG=325020
Review URL: https://codereview.chromium.org/140513002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246377 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL provides just enough functionality so that
PrototypeFakeServerTest will pass.
This was originally committed as r245326, but was reverted due to
compile errors.
BUG=323265
Review URL: https://codereview.chromium.org/139783006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245732 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce the ModelTypeRegistry class and use it to manage the creation
of UpdateHandlers and CommitContributors. The ModelTypeRegistry also
gets some help from the newly introduced UpdaterList and CommitterList
classes.
This lets us move the verbose iteration logic out of the code that's
focused on building and executing commits and updates, which should make
those functions easier to read. It gives us more freedom to experiment
with other ways to manage the lists of commit contributors and update
handlers, should we choose to do so. It prevents us from leaking the
set of enabled types through the per-type maps.
This patch is one of the last in the stack related to building a
per-type abstraction into the sync engine, and also one of the first
steps towards implementing run-time enable and disable logic for the
new-style sync types.
BUG=278484
Review URL: https://codereview.chromium.org/93433006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245654 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
> Basic implementation of the Sync C++ fake server
>
> This CL provides just enough functionality so that
> PrototypeFakeServerTest will pass.
>
> BUG=323265
>
> Review URL: https://codereview.chromium.org/115243007
TBR=pvalenzuela@chromium.org
Review URL: https://codereview.chromium.org/130503007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245341 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
This CL provides just enough functionality so that
PrototypeFakeServerTest will pass.
BUG=323265
Review URL: https://codereview.chromium.org/115243007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245326 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL removes a number of functions from the sync debugging framework
in order to prepare for some upcoming changes to sync debugging (due to
328606).
This CL removes the following functions:
- GetRootNodeDetails
- GetNodeSummaries
- GetNodeDetails
- GetChildNodeIds
It also adds the function 'getListOfKnownTypes' to help replace some old
functionality required by the 'data' tab and to fix issue 329013.
Rather than having that tab fetch a list of children of the root node,
it now asks for a list of all known data types. This is a better
solution, since it does not require sync to be fully initialized in
order to properly populate the set of checkboxes.
The most significant user of the removed functionality is the node
browser. Its javascript code has been modified in order to transition
it to relying on the getAllNodes function. Rather than fetching node
data on demand by a series of asynchronous callbacks, the tab now
fetches a list of all known sync nodes at once. This has the advantage
of providing a more consistent (though more stale) snapshot. This CL
adds a refresh button to the node browser tab in order to give users
some control over its staleness.
This change had some minor side-effects. The node browser now relies on
items' string-based IDs rather than their metahandles when determining
the nodes' hierarchy. We've also had to add a 'positionIndex' field to
the output of getAllNodes to make it easier for the node browser to sort
its entries. In part to make it easier to fetch this field, most of the
code associated with getAllNodes has been moved into the
syncable::Directory.
In addition to all these changes, this CL adds some webui tests to help
prevent regressions in about:sync functionality. For now, they only
cover the node browser. More tests will be added in future CLs.
BUG=110517,329013,328606
Review URL: https://codereview.chromium.org/134443004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245313 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
Support GU retry command in sync engine. The command specifies a delay after which syncer should issue a GU to pick up updates missed by last GU.
TBR=rlarocque@chromium.org
Review URL: https://codereview.chromium.org/133763007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244736 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test fails on the valgrind bot:
http://build.chromium.org/p/chromium.memory.fyi/builders/Linux%20Tests%20%28tsan%29%281%29/builds/11739/steps/memory%20test%3A%20unit/logs/EphemeralAppServiceTest.RemoveOverflow
EphemeralAppServiceTest.RemoveOverflow:
../../chrome/browser/apps/ephemeral_app_service_unittest.cc:83: Failure
Value of: removed->first < retained->first
Actual: false
Expected: true
> Support GU retry command in sync engine. The command specifies a delay after which syncer should issue a GU to pick up updates missed by last GU.
>
> BUG=
>
> Review URL: https://codereview.chromium.org/124083002
TBR=haitaol@chromium.org
Review URL: https://codereview.chromium.org/135923002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244438 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
which syncer should issue a GU to pick up updates missed by last GU.
BUG=
Review URL: https://codereview.chromium.org/124083002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244381 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Certain interfaces in sync had signatures that included vectors of raw
pointers to ModelSafeWorkers. The use of raw pointers to refcounted
objects looks a lot like a bug waiting to happen.
This CL replaces any use of std::vector<ModelSafeWorker*> with
std::vector<scoped_refptr<ModelSafeWorker> >. This is not expected to
alter sync behavior in any significant way.
BUG=332251
Review URL: https://codereview.chromium.org/130193002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244329 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL syncs the launch type pref for apps by adding a property to
app_specifics.proto. The sync data is processed in ExtensionSyncService.
extensions::SetLaunchType has been changed to take an ExtensionService
so that it is able to sync the pref change when a launch type is updated.
A value has been added to the LaunchType enum to represent an invalid
launch type preference.
BUG=181576
TBR=sky@chromium.org
Review URL: https://codereview.chromium.org/93883004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244112 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=299154
TEST=unit_tests
R=estade@chromium.org
Review URL: https://codereview.chromium.org/127403002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243832 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
Review URL: https://codereview.chromium.org/83433008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243750 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=none
NOTRY=true
Review URL: https://codereview.chromium.org/129533004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243696 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=332169
R=zea@chromium.org
Review URL: https://codereview.chromium.org/128193002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243693 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With future introduction of access token request not all calls to
TrySyncSessionJob will result in posted tasks. Still fact that
TrySyncSessionJob was called with CANARY_PRIORITY needs to be preserved.
I'm making next job priority part of scheduler's state. TryCanaryJob
sets it to canary, any call to TrySyncSessionJobImpl resets it back to
normal.
BUG=259913
Review URL: https://codereview.chromium.org/124423002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242997 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change introduces boilerplate GCMNetworkChannel implementation and switches
sync/notifier classes to refer network channel through base class
SyncNetworkChannel.
TiclInvalidationService can initialize invalidator with either PushClient or
GCM channel. On one hand goal was to not expose network channel implementation to
TiclInvalidationService, on the other hand to avoid passing channel specific
parameters across sync/notifier classes during initialization.
The solution is to introduce NetworkChannelCreator callback that takes no
parameters and returns scoped_ptr to SyncNetworkChannel. There are helper
functions in SyncNetworkChannel to create implementations for Puch/GCM clients
and helper functions in NonBlockingInvalidator to createNetworkChannelCreator.
The alternative was to create NetworkChannel factory interface and write
implementations of it for each channel type. This would provide more expressive
names, but requires interface and two implementations for simple purpose.
Review URL: https://codereview.chromium.org/116533006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242991 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
SyncAttachmentId. The interfaces are still in flux and will likely change.
Review URL: https://codereview.chromium.org/102193004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242818 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
sandbox/, skia/, sql/, sync/, tools/, webkit/, win8/ to use the base:: namespace.
BUG=330556
TEST=no change
TBR=ben@chromium.org
Review URL: https://codereview.chromium.org/121123002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242502 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=88666
TEST=no change
TBR=ben@chromium.org
Review URL: https://codereview.chromium.org/116543010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242440 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
printing/, remoting/, rlz/, sync/, ui/ to use the base:: namespace.
BUG=88666
TEST=no change
TBR=ben@chromium.org
Review URL: https://codereview.chromium.org/116433007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242410 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=316168
Review URL: https://codereview.chromium.org/76333002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241779 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary of work:
- get tests passing with or without --enable-sync-sessions-v2 (unit_tests, browser_tests, sync_integration_tests)
- did not deal with the disabled sessions perf test. requires non-trival changes, and I'm not sure it's worthwhile yet.
- impelement StopSyncing, GetAllSyncData
- fixed a bug discovered by manual testing where the client tag for a tab node was using an invalid tab_node_id on update.
- remove most remaining references to SessionModelAssociator
- ran some manual coverage of backwards compatibility with v1
This patch does add temporary complexity to a few tests, namely WrenchMenuControllerTest and RecentTabsSubMenuModelTest. The goal was to make things work with or without the flag to minimize diffs during rollout, if we have to swap flag values. I'll remove the extra code once SessionModelAssociator is no more.
BUG=98892
Review URL: https://codereview.chromium.org/110583002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241582 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|