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

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

Issue 2479593006: Move enable extensions define to a build flag. (Closed)
Patch Set: Merge Created 4 years, 1 month 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.h ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/themes/theme_service.cc
diff --git a/chrome/browser/themes/theme_service.cc b/chrome/browser/themes/theme_service.cc
index 9c31c0fd3b25f1d3e7cf8b581070e98710fa0dc2..1dad1aa5b3b81bc453776d1164a18fc271ca3726 100644
--- a/chrome/browser/themes/theme_service.cc
+++ b/chrome/browser/themes/theme_service.cc
@@ -40,6 +40,7 @@
#include "extensions/browser/uninstall_reason.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_set.h"
+#include "extensions/features/features.h"
#include "ui/base/layout.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/color_palette.h"
@@ -47,7 +48,7 @@
#include "ui/native_theme/common_theme.h"
#include "ui/native_theme/native_theme.h"
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "extensions/browser/extension_registry_observer.h"
#endif
@@ -156,7 +157,7 @@ base::RefCountedMemory* ThemeService::BrowserThemeProvider::GetRawData(
// ThemeService::ThemeObserver ------------------------------------------------
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
class ThemeService::ThemeObserver
: public extensions::ExtensionRegistryObserver {
public:
@@ -205,7 +206,7 @@ class ThemeService::ThemeObserver
ThemeService* theme_service_;
};
-#endif // defined(ENABLE_EXTENSIONS)
+#endif // BUILDFLAG(ENABLE_EXTENSIONS)
// ThemeService ---------------------------------------------------------------
@@ -242,7 +243,7 @@ void ThemeService::Init(Profile* profile) {
}
void ThemeService::Shutdown() {
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
theme_observer_.reset();
#endif
}
@@ -796,7 +797,7 @@ void ThemeService::OnExtensionServiceReady() {
NotifyThemeChanged();
}
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
theme_observer_.reset(new ThemeObserver(this));
#endif
« no previous file with comments | « chrome/browser/themes/theme_service.h ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698