summaryrefslogtreecommitdiffstats
path: root/chrome/browser/themes/theme_syncable_service_unittest.cc
diff options
context:
space:
mode:
authorstanisc@chromium.org <stanisc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-19 02:24:21 +0000
committerstanisc@chromium.org <stanisc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-19 02:24:21 +0000
commitac06fdad5048cc9504d07be4832525f38a7b556a (patch)
tree7ec85c969b862a397551eed1d82cc1e8c49bc01e /chrome/browser/themes/theme_syncable_service_unittest.cc
parentca444645768d4f63472a5a9086bf71f9f4abd666 (diff)
downloadchromium_src-ac06fdad5048cc9504d07be4832525f38a7b556a.zip
chromium_src-ac06fdad5048cc9504d07be4832525f38a7b556a.tar.gz
chromium_src-ac06fdad5048cc9504d07be4832525f38a7b556a.tar.bz2
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
Diffstat (limited to 'chrome/browser/themes/theme_syncable_service_unittest.cc')
-rw-r--r--chrome/browser/themes/theme_syncable_service_unittest.cc4
1 files changed, 1 insertions, 3 deletions
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) {