Protect references to ThemeService* with ENABLE_THEMES
On android, ENABLE_THEMES and ENABLE_PROTECTOR_SERVICE are not defined.
This fixes some link errors for unit_tests.
BUG=117407
TEST=
Review URL: https://chromiumcodereview.appspot.com/10704148
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146028 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 8cc4bb1..1f2a887 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -1873,12 +1873,14 @@
extension_paths)))
NOTREACHED();
+#if defined(ENABLE_THEMES)
// Also garbage-collect themes. We check |profile_| to be
// defensive; in the future, we may call GarbageCollectExtensions()
// from somewhere other than Init() (e.g., in a timer).
if (profile_) {
ThemeServiceFactory::GetForProfile(profile_)->RemoveUnusedThemes();
}
+#endif
}
void ExtensionService::SyncExtensionChangeIfNeeded(const Extension& extension) {