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

Unified Diff: chrome/browser/search/instant_service.cc

Issue 2561013002: Remove the enable_themes build flag and define. (Closed)
Patch Set: Merge Created 4 years 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/search/instant_service.h ('k') | chrome/browser/search/instant_service_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search/instant_service.cc
diff --git a/chrome/browser/search/instant_service.cc b/chrome/browser/search/instant_service.cc
index 5e3995880496ebef49723ec753db3ec7d7946c7d..c897a96cf9580815969ed9f8b9e5b7ace20c42b9 100644
--- a/chrome/browser/search/instant_service.cc
+++ b/chrome/browser/search/instant_service.cc
@@ -51,13 +51,10 @@
#if !defined(OS_ANDROID)
#include "chrome/browser/search/local_ntp_source.h"
-#endif
-
-#if defined(ENABLE_THEMES)
#include "chrome/browser/themes/theme_properties.h"
#include "chrome/browser/themes/theme_service.h"
#include "chrome/browser/themes/theme_service_factory.h"
-#endif // defined(ENABLE_THEMES)
+#endif
namespace {
@@ -136,18 +133,15 @@ InstantService::InstantService(Profile* profile)
}
// Set up the data sources that Instant uses on the NTP.
-#if defined(ENABLE_THEMES)
+ // TODO(aurimas) remove this #if once instant_service.cc is no longer compiled
+ // on Android.
+#if !defined(OS_ANDROID)
// Listen for theme installation.
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
content::Source<ThemeService>(
ThemeServiceFactory::GetForProfile(profile_)));
content::URLDataSource::Add(profile_, new ThemeSource(profile_));
-#endif // defined(ENABLE_THEMES)
-
- // TODO(aurimas) remove this #if once instant_service.cc is no longer compiled
- // on Android.
-#if !defined(OS_ANDROID)
content::URLDataSource::Add(profile_, new LocalNtpSource(profile_));
content::URLDataSource::Add(profile_, new ThumbnailSource(profile_, false));
content::URLDataSource::Add(profile_, new ThumbnailSource(profile_, true));
@@ -228,7 +222,7 @@ void InstantService::UndoAllMostVisitedDeletions() {
}
void InstantService::UpdateThemeInfo() {
-#if defined(ENABLE_THEMES)
+#if !defined(OS_ANDROID)
// Update theme background info.
// Initialize |theme_info| if necessary.
if (!theme_info_) {
@@ -237,7 +231,7 @@ void InstantService::UpdateThemeInfo() {
for (InstantServiceObserver& observer : observers_)
observer.ThemeInfoChanged(*theme_info_);
}
-#endif // defined(ENABLE_THEMES)
+#endif // !defined(OS_ANDROID)
}
void InstantService::UpdateMostVisitedItemsInfo() {
@@ -288,11 +282,11 @@ void InstantService::Observe(int type,
OnRendererProcessTerminated(
content::Source<content::RenderProcessHost>(source)->GetID());
break;
-#if defined(ENABLE_THEMES)
+#if !defined(OS_ANDROID)
case chrome::NOTIFICATION_BROWSER_THEME_CHANGED:
OnThemeChanged();
break;
-#endif // defined(ENABLE_THEMES)
+#endif // !defined(OS_ANDROID)
default:
NOTREACHED() << "Unexpected notification type in InstantService.";
}
@@ -347,7 +341,7 @@ void InstantService::NotifyAboutMostVisitedItems() {
observer.MostVisitedItemsChanged(most_visited_items_);
}
-#if defined(ENABLE_THEMES)
+#if !defined(OS_ANDROID)
namespace {
@@ -466,7 +460,7 @@ void InstantService::OnThemeChanged() {
for (InstantServiceObserver& observer : observers_)
observer.ThemeInfoChanged(*theme_info_);
}
-#endif // defined(ENABLE_THEMES)
+#endif // !defined(OS_ANDROID)
void InstantService::OnTemplateURLServiceChanged() {
// Check whether the default search provider was changed.
« no previous file with comments | « chrome/browser/search/instant_service.h ('k') | chrome/browser/search/instant_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698