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

Unified Diff: chrome/browser/push_messaging/push_messaging_notification_manager.cc

Issue 1459793002: Android: Allow compiling browser without Java UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: chrome/browser/push_messaging/push_messaging_notification_manager.cc
diff --git a/chrome/browser/push_messaging/push_messaging_notification_manager.cc b/chrome/browser/push_messaging/push_messaging_notification_manager.cc
index faf3b445789c46624bd738ed16c0c7c24e1e0cdf..af86113187bfefb100aff3335af0749ebd834636 100644
--- a/chrome/browser/push_messaging/push_messaging_notification_manager.cc
+++ b/chrome/browser/push_messaging/push_messaging_notification_manager.cc
@@ -29,7 +29,7 @@
#include "ui/base/l10n/l10n_util.h"
#include "url/gurl.h"
-#if defined(OS_ANDROID)
+#if defined(ANDROID_JAVA_UI)
#include "chrome/browser/ui/android/tab_model/tab_model.h"
#include "chrome/browser/ui/android/tab_model/tab_model_list.h"
#else
@@ -118,7 +118,7 @@ void PushMessagingNotificationManager::DidGetNotificationsFromDatabase(
bool notification_needed = true;
// Sites with a currently visible tab don't need to show notifications.
-#if defined(OS_ANDROID)
+#if defined(ANDROID_JAVA_UI)
for (auto it = TabModelList::begin(); it != TabModelList::end(); ++it) {
Profile* profile = (*it)->GetProfile();
content::WebContents* active_web_contents =
@@ -152,11 +152,7 @@ void PushMessagingNotificationManager::DidGetNotificationsFromDatabase(
notification_needed = false;
break;
}
-#if defined(OS_ANDROID)
}
-#else
- }
-#endif
// If more than one notification is showing for this Service Worker, close
// the default notification if it happens to be part of this group.

Powered by Google App Engine
This is Rietveld 408576698