From ac06fdad5048cc9504d07be4832525f38a7b556a Mon Sep 17 00:00:00 2001 From: "stanisc@chromium.org" Date: Sat, 19 Jul 2014 02:24:21 +0000 Subject: 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 Review URL: https://codereview.chromium.org/388003002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284286 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/themes/theme_syncable_service_unittest.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'chrome/browser/themes/theme_syncable_service_unittest.cc') diff --git a/chrome/browser/themes/theme_syncable_service_unittest.cc b/chrome/browser/themes/theme_syncable_service_unittest.cc index afb63ea..fe22dea 100644 --- a/chrome/browser/themes/theme_syncable_service_unittest.cc +++ b/chrome/browser/themes/theme_syncable_service_unittest.cc @@ -535,9 +535,7 @@ TEST_F(ThemeSyncableServiceTest, StopSync) { error = theme_sync_service_->ProcessSyncChanges(FROM_HERE, changes); EXPECT_TRUE(error.IsSet()); EXPECT_EQ(syncer::THEMES, error.model_type()); - EXPECT_EQ("datatype error was encountered: Theme syncable service is not " - "started.", - error.message()); + EXPECT_EQ("Theme syncable service is not started.", error.message()); } TEST_F(ThemeSyncableServiceTest, RestoreSystemThemeBitWhenChangeToCustomTheme) { -- cgit v1.1