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

Unified Diff: chrome/browser/themes/theme_syncable_service.cc

Issue 388563004: Fix syncing of system theme on Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/themes/theme_service_aurax11.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/themes/theme_syncable_service.cc
diff --git a/chrome/browser/themes/theme_syncable_service.cc b/chrome/browser/themes/theme_syncable_service.cc
index 82550f9a517db7f183533071485e7d1e9c210bcd..4e2cd69e92a4ad1bcb53ca3a46073d8e680cfc8c 100644
--- a/chrome/browser/themes/theme_syncable_service.cc
+++ b/chrome/browser/themes/theme_syncable_service.cc
@@ -24,15 +24,6 @@ bool IsTheme(const extensions::Extension* extension) {
return extension->is_theme();
}
-// TODO(akalin): Remove this.
-bool IsSystemThemeDistinctFromDefaultTheme() {
-#if defined(TOOLKIT_GTK)
- return true;
-#else
- return false;
-#endif
-}
-
} // namespace
const char ThemeSyncableService::kCurrentThemeClientTag[] = "current_theme";
@@ -193,8 +184,10 @@ void ThemeSyncableService::MaybeSetTheme(
const sync_pb::ThemeSpecifics& sync_theme = sync_data.GetSpecifics().theme();
use_system_theme_by_default_ = sync_theme.use_system_theme_by_default();
DVLOG(1) << "Set current theme from specifics: " << sync_data.ToString();
- if (!AreThemeSpecificsEqual(current_specs, sync_theme,
- IsSystemThemeDistinctFromDefaultTheme())) {
+ if (!AreThemeSpecificsEqual(
+ current_specs,
+ sync_theme,
+ theme_service_->IsSystemThemeDistinctFromDefaultTheme())) {
SetCurrentThemeFromThemeSpecifics(sync_theme);
} else {
DVLOG(1) << "Skip setting theme because specs are equal";
@@ -266,7 +259,7 @@ bool ThemeSyncableService::GetThemeSpecificsFromCurrentTheme(
}
bool use_custom_theme = (current_theme != NULL);
theme_specifics->set_use_custom_theme(use_custom_theme);
- if (IsSystemThemeDistinctFromDefaultTheme()) {
+ if (theme_service_->IsSystemThemeDistinctFromDefaultTheme()) {
// On platform where system theme is different from default theme, set
// use_system_theme_by_default to true if system theme is used, false
// if default system theme is used. Otherwise restore it to value in sync.
« no previous file with comments | « chrome/browser/themes/theme_service_aurax11.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698