| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/sync/glue/theme_util.h" | 5 #include "chrome/browser/sync/glue/theme_util.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "chrome/browser/extensions/extension_service.h" | 11 #include "chrome/browser/extensions/extension_service.h" |
| 12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/browser/themes/theme_service.h" | 13 #include "chrome/browser/themes/theme_service.h" |
| 14 #include "chrome/browser/themes/theme_service_factory.h" | 14 #include "chrome/browser/themes/theme_service_factory.h" |
| 15 #include "chrome/common/extensions/extension.h" | 15 #include "chrome/common/extensions/extension.h" |
| 16 #include "chrome/common/extensions/extension_constants.h" | 16 #include "chrome/common/extensions/extension_constants.h" |
| 17 #include "googleurl/src/gurl.h" | 17 #include "googleurl/src/gurl.h" |
| 18 #include "sync/protocol/theme_specifics.pb.h" | 18 #include "sync/protocol/theme_specifics.pb.h" |
| 19 | 19 |
| 20 using extensions::Extension; |
| 21 |
| 20 namespace browser_sync { | 22 namespace browser_sync { |
| 21 | 23 |
| 22 const char kCurrentThemeClientTag[] = "current_theme"; | 24 const char kCurrentThemeClientTag[] = "current_theme"; |
| 23 | 25 |
| 24 namespace { | 26 namespace { |
| 25 | 27 |
| 26 // TODO(akalin): Remove this. | 28 // TODO(akalin): Remove this. |
| 27 bool IsSystemThemeDistinctFromDefaultTheme() { | 29 bool IsSystemThemeDistinctFromDefaultTheme() { |
| 28 #if defined(TOOLKIT_GTK) | 30 #if defined(TOOLKIT_GTK) |
| 29 return true; | 31 return true; |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 const sync_pb::ThemeSpecifics& theme_specifics, Profile* profile) { | 179 const sync_pb::ThemeSpecifics& theme_specifics, Profile* profile) { |
| 178 DCHECK(profile); | 180 DCHECK(profile); |
| 179 sync_pb::ThemeSpecifics old_theme_specifics; | 181 sync_pb::ThemeSpecifics old_theme_specifics; |
| 180 GetThemeSpecificsFromCurrentTheme(profile, &old_theme_specifics); | 182 GetThemeSpecificsFromCurrentTheme(profile, &old_theme_specifics); |
| 181 if (!AreThemeSpecificsEqual(old_theme_specifics, theme_specifics)) { | 183 if (!AreThemeSpecificsEqual(old_theme_specifics, theme_specifics)) { |
| 182 SetCurrentThemeFromThemeSpecifics(theme_specifics, profile); | 184 SetCurrentThemeFromThemeSpecifics(theme_specifics, profile); |
| 183 } | 185 } |
| 184 } | 186 } |
| 185 | 187 |
| 186 } // namespace browser_sync | 188 } // namespace browser_sync |
| OLD | NEW |