summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpliard@chromium.org <pliard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-13 15:45:51 +0000
committerpliard@chromium.org <pliard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-13 15:45:51 +0000
commit4a8a9fd0acdf01c968cb14d552d9e160452a6b09 (patch)
tree27fe43573109d57f8908c0a43cc42b5f8525ccb7
parentc78f28381ebaf8aa32a3901c7810511925b59ad1 (diff)
downloadchromium_src-4a8a9fd0acdf01c968cb14d552d9e160452a6b09.zip
chromium_src-4a8a9fd0acdf01c968cb14d552d9e160452a6b09.tar.gz
chromium_src-4a8a9fd0acdf01c968cb14d552d9e160452a6b09.tar.bz2
Exclude suggestions-related code from build on Android.
This is part of Chrome for Android upstreaming and more importantly needed to link unit_tests. BUG=136787 Review URL: https://chromiumcodereview.appspot.com/10690083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146578 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/webui/ntp/new_tab_ui.cc12
-rw-r--r--chrome/chrome_browser.gypi8
-rw-r--r--chrome/chrome_tests.gypi1
3 files changed, 15 insertions, 6 deletions
diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui.cc b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
index ef71746..1ff1a49 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
@@ -32,11 +32,9 @@
#include "chrome/browser/ui/webui/ntp/foreign_session_handler.h"
#include "chrome/browser/ui/webui/ntp/most_visited_handler.h"
#include "chrome/browser/ui/webui/ntp/new_tab_page_handler.h"
-#include "chrome/browser/ui/webui/ntp/ntp_login_handler.h"
#include "chrome/browser/ui/webui/ntp/ntp_resource_cache.h"
#include "chrome/browser/ui/webui/ntp/ntp_resource_cache_factory.h"
#include "chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.h"
-#include "chrome/browser/ui/webui/ntp/suggestions_page_handler.h"
#include "chrome/browser/ui/webui/theme_source.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
@@ -59,6 +57,8 @@
#if !defined(OS_ANDROID)
#include "chrome/browser/ui/webui/ntp/app_launcher_handler.h"
#include "chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.h"
+#include "chrome/browser/ui/webui/ntp/ntp_login_handler.h"
+#include "chrome/browser/ui/webui/ntp/suggestions_page_handler.h"
#endif
using content::BrowserThread;
@@ -104,11 +104,11 @@ NewTabUI::NewTabUI(content::WebUI* web_ui)
if (!GetProfile()->IsOffTheRecord()) {
web_ui->AddMessageHandler(new browser_sync::ForeignSessionHandler());
web_ui->AddMessageHandler(new MostVisitedHandler());
- if (NewTabUI::IsSuggestionsPageEnabled())
- web_ui->AddMessageHandler(new SuggestionsHandler());
web_ui->AddMessageHandler(new RecentlyClosedTabsHandler());
web_ui->AddMessageHandler(new MetricsHandler());
#if !defined(OS_ANDROID)
+ if (NewTabUI::IsSuggestionsPageEnabled())
+ web_ui->AddMessageHandler(new SuggestionsHandler());
// Android doesn't have a sync promo/username on NTP.
if (GetProfile()->IsSyncAccessible())
web_ui->AddMessageHandler(new NewTabPageSyncHandler());
@@ -269,10 +269,10 @@ void NewTabUI::RegisterUserPrefs(PrefService* prefs) {
NewTabPageHandler::RegisterUserPrefs(prefs);
#if !defined(OS_ANDROID)
AppLauncherHandler::RegisterUserPrefs(prefs);
-#endif
- MostVisitedHandler::RegisterUserPrefs(prefs);
if (NewTabUI::IsSuggestionsPageEnabled())
SuggestionsHandler::RegisterUserPrefs(prefs);
+#endif
+ MostVisitedHandler::RegisterUserPrefs(prefs);
browser_sync::ForeignSessionHandler::RegisterUserPrefs(prefs);
}
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index 9e381cf..8137140 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -4846,9 +4846,17 @@
# Android uses native UI for sync setup.
'browser/ui/webui/ntp/new_tab_page_sync_handler.cc',
+ 'browser/ui/webui/ntp/new_tab_page_sync_handler.h',
'browser/ui/webui/ntp/new_tab_sync_setup_handler.cc',
+ 'browser/ui/webui/ntp/new_tab_sync_setup_handler.h',
'browser/ui/webui/ntp/ntp_login_handler.cc',
+ 'browser/ui/webui/ntp/ntp_login_handler.h',
+ 'browser/ui/webui/ntp/suggestions_combiner.cc',
+ 'browser/ui/webui/ntp/suggestions_combiner.h',
+ 'browser/ui/webui/ntp/suggestions_page_handler.cc',
+ 'browser/ui/webui/ntp/suggestions_page_handler.h',
'browser/ui/webui/sync_setup_handler.cc',
+ 'browser/ui/webui/sync_setup_handler.h',
# about:flags is unsupported.
'browser/about_flags.cc',
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index 3efbd09..d329e61 100644
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -2421,6 +2421,7 @@
'browser/ui/tab_contents/tab_contents_iterator_unittest.cc',
'browser/ui/toolbar/toolbar_model_unittest.cc',
'browser/ui/toolbar/wrench_menu_model_unittest.cc',
+ 'browser/ui/webui/ntp/suggestions_combiner_unittest.cc',
'browser/ui/webui/web_dialog_web_contents_delegate_unittest.cc',
'browser/ui/window_sizer/window_sizer_unittest.cc',
'test/base/browser_with_test_window_test.cc',