Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Issue 388003002: Sync: Display non-severe errors on about:sync in gray color rather than red. (Closed)

Created:
6 years, 5 months ago by stanisc
Modified:
6 years, 5 months ago
CC:
chromium-reviews, tim+watch_chromium.org, haitaol+watch_chromium.org, arv+watch_chromium.org, zea+watch_chromium.org, maniscalco+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Sync: 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. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+148 lines, -74 lines) Patch
M chrome/browser/resources/sync_internals/about.css View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/glue/extension_backed_data_type_controller.cc View 1 2 3 4 1 chunk +6 lines, -3 lines 0 comments Download
M chrome/browser/sync/glue/frontend_data_type_controller.cc View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/glue/non_frontend_data_type_controller.cc View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/sync/glue/non_frontend_data_type_controller_unittest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/glue/typed_url_data_type_controller.cc View 1 2 3 4 1 chunk +5 lines, -3 lines 0 comments Download
M chrome/browser/sync/glue/typed_url_model_associator_unittest.cc View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/sync/profile_sync_components_factory_impl.cc View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/sync/profile_sync_service.h View 1 2 3 4 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/browser/sync/profile_sync_service.cc View 1 2 3 4 4 chunks +31 lines, -21 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_mock.h View 1 2 3 4 1 chunk +1 line, -3 lines 0 comments Download
M chrome/browser/themes/theme_syncable_service_unittest.cc View 1 2 3 4 1 chunk +1 line, -3 lines 0 comments Download
M components/sync_driver/failed_data_types_handler.cc View 1 chunk +1 line, -0 lines 0 comments Download
M sync/api/sync_error.h View 1 2 3 2 chunks +16 lines, -1 line 0 comments Download
M sync/api/sync_error.cc View 1 2 3 4 2 chunks +50 lines, -27 lines 0 comments Download
M sync/api/sync_error_unittest.cc View 1 2 3 4 1 chunk +17 lines, -1 line 0 comments Download

Messages

Total messages: 11 (0 generated)
stanisc
6 years, 5 months ago (2014-07-12 00:17:14 UTC) #1
Nicolas Zea
Mostly nits https://codereview.chromium.org/388003002/diff/1/chrome/browser/sync/profile_sync_service.h File chrome/browser/sync/profile_sync_service.h (right): https://codereview.chromium.org/388003002/diff/1/chrome/browser/sync/profile_sync_service.h#newcode554 chrome/browser/sync/profile_sync_service.h:554: virtual void DisableDatatype(syncer::ModelType type, Does it make ...
6 years, 5 months ago (2014-07-14 17:36:02 UTC) #2
stanisc
Addressed feedback. Introduced SyncError::Severity to use instead of logging::LogSeverity. I had some troubles building this ...
6 years, 5 months ago (2014-07-15 16:10:01 UTC) #3
Nicolas Zea
LGTM with a comment https://codereview.chromium.org/388003002/diff/60001/chrome/browser/sync/profile_sync_service.h File chrome/browser/sync/profile_sync_service.h (right): https://codereview.chromium.org/388003002/diff/60001/chrome/browser/sync/profile_sync_service.h#newcode554 chrome/browser/sync/profile_sync_service.h:554: virtual void DisableDatatype(syncer::ModelType type, given ...
6 years, 5 months ago (2014-07-16 21:18:30 UTC) #4
stanisc
pkotwicz@chromium.org or jhawkins@chromium.org: Please review chrome/browser/themes/theme_syncable_service_unittest.cc https://codereview.chromium.org/388003002/diff/60001/chrome/browser/sync/profile_sync_service.h File chrome/browser/sync/profile_sync_service.h (right): https://codereview.chromium.org/388003002/diff/60001/chrome/browser/sync/profile_sync_service.h#newcode554 chrome/browser/sync/profile_sync_service.h:554: virtual void DisableDatatype(syncer::ModelType ...
6 years, 5 months ago (2014-07-18 01:36:47 UTC) #5
James Hawkins
Which files are you asking me to review?
6 years, 5 months ago (2014-07-18 16:39:00 UTC) #6
chromium-reviews
Just one file: chrome/browser/themes/theme_syncable_service_unittest.cc On Fri, Jul 18, 2014 at 9:39 AM, <jhawkins@chromium.org> wrote: > ...
6 years, 5 months ago (2014-07-18 19:01:39 UTC) #7
James Hawkins
lgtm
6 years, 5 months ago (2014-07-18 20:23:55 UTC) #8
stanisc
The CQ bit was checked by stanisc@chromium.org
6 years, 5 months ago (2014-07-19 01:41:29 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/stanisc@chromium.org/388003002/100001
6 years, 5 months ago (2014-07-19 01:42:42 UTC) #10
commit-bot: I haz the power
6 years, 5 months ago (2014-07-19 02:24:26 UTC) #11
Message was sent while issue was closed.
Change committed as 284286

Powered by Google App Engine
This is Rietveld 408576698