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

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

Issue 1086973003: Misc undefined symbol fixes for Android+LTO. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move #include block down Created 5 years, 8 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/search/instant_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/search/instant_service.cc
diff --git a/chrome/browser/search/instant_service.cc b/chrome/browser/search/instant_service.cc
index 441a997298fd5267a96eedbe300f08585f263965..bf75e9a5c75ce7f1de4659b1f5c70591590a9107 100644
--- a/chrome/browser/search/instant_service.cc
+++ b/chrome/browser/search/instant_service.cc
@@ -16,9 +16,6 @@
#include "chrome/browser/search/suggestions/suggestions_source.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/browser/search_engines/ui_thread_search_terms_data.h"
-#include "chrome/browser/themes/theme_properties.h"
-#include "chrome/browser/themes/theme_service.h"
-#include "chrome/browser/themes/theme_service_factory.h"
#include "chrome/browser/thumbnails/thumbnail_list_source.h"
#include "chrome/browser/ui/search/instant_search_prerenderer.h"
#include "chrome/browser/ui/webui/fallback_icon_source.h"
@@ -47,21 +44,11 @@
#include "chrome/browser/search/local_ntp_source.h"
#endif
-namespace {
-
-const int kSectionBorderAlphaTransparency = 80;
-
-// Converts SkColor to RGBAColor
-RGBAColor SkColorToRGBAColor(const SkColor& sKColor) {
- RGBAColor color;
- color.r = SkColorGetR(sKColor);
- color.g = SkColorGetG(sKColor);
- color.b = SkColorGetB(sKColor);
- color.a = SkColorGetA(sKColor);
- return color;
-}
-
-} // namespace
+#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)
InstantService::InstantService(Profile* profile)
: profile_(profile),
@@ -204,12 +191,14 @@ void InstantService::UndoAllMostVisitedDeletions() {
}
void InstantService::UpdateThemeInfo() {
+#if defined(ENABLE_THEMES)
// Update theme background info.
// Initialize |theme_info| if necessary.
if (!theme_info_)
OnThemeChanged(ThemeServiceFactory::GetForProfile(profile_));
else
OnThemeChanged(NULL);
+#endif // defined(ENABLE_THEMES)
}
void InstantService::UpdateMostVisitedItemsInfo() {
@@ -300,6 +289,24 @@ void InstantService::NotifyAboutMostVisitedItems() {
MostVisitedItemsChanged(most_visited_items_));
}
+#if defined(ENABLE_THEMES)
+
+namespace {
+
+const int kSectionBorderAlphaTransparency = 80;
+
+// Converts SkColor to RGBAColor
+RGBAColor SkColorToRGBAColor(const SkColor& sKColor) {
+ RGBAColor color;
+ color.r = SkColorGetR(sKColor);
+ color.g = SkColorGetG(sKColor);
+ color.b = SkColorGetB(sKColor);
+ color.a = SkColorGetA(sKColor);
+ return color;
+}
+
+} // namespace
+
void InstantService::OnThemeChanged(ThemeService* theme_service) {
if (!theme_service) {
DCHECK(theme_info_.get());
@@ -407,6 +414,7 @@ void InstantService::OnThemeChanged(ThemeService* theme_service) {
FOR_EACH_OBSERVER(InstantServiceObserver, observers_,
ThemeInfoChanged(*theme_info_));
}
+#endif // defined(ENABLE_THEMES)
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/ui/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698