DescriptionSync: Display non-severe errors on about:sync in gray color rather than red.
This fix changes representation of some disabled datatypes on about:sync page.
There are two special cases supported by this fix:
1) When a datatype needs to be disabled due to configuration constraints,
for example, when sync to need to disable delete directives when
encryption is enabled.
2) When a datatype isn't ready to start yet (was disabled with
SyncError::UNREADY_ERROR).
To implement the fix, SyncError class was extended with severity() property,
which is based on the error type. The purpose of severity is to determine
logging severity of the error and the representation on about:sync page.
Sync errors of UNREADY_ERROR and DATATYPE_POLICY_ERROR types are logged with
LOG_INFO level rather than LOG_ERROR. In the UI errors of these types are
displayed on gray background rather than red.
DATATYPE_POLICY_ERROR is a new error type used for a few cases when a type
is disabled by policy (i.e. configuration constraints). Other than its
severity it is treated the same as DATATYPE_ERROR.
I added an overload for DisableDatatype function which allows to specify
an error type. By default, the error type is DATATYPE_ERROR which is
consistent with the current implementation.
BUG=380446, 392110
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=284286
Patch Set 1 #
Total comments: 12
Patch Set 2 : Addressed CR feedback #Patch Set 3 : Fixed Windows specific build issue caused by using ERROR for SyncError::Severity #Patch Set 4 : Fixed Windows specific build issue caused by using SEVERITY_ERROR for SyncError::Severity #
Total comments: 2
Patch Set 5 : Fixed failing unit test, added extra test case, addressed CR feedback. #Messages
Total messages: 11 (0 generated)
|