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

Unified Diff: chrome/browser/notifications/notification_platform_bridge_android.cc

Issue 2749453002: Make GetDisplayedNotifications asynchronous. (Closed)
Patch Set: review Created 3 years, 9 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
Index: chrome/browser/notifications/notification_platform_bridge_android.cc
diff --git a/chrome/browser/notifications/notification_platform_bridge_android.cc b/chrome/browser/notifications/notification_platform_bridge_android.cc
index 0c8c82fe6f819c043ad8bc8419020a02332cd819..697fac98b2508d3cd28e77eca840eb12c4b552c2 100644
--- a/chrome/browser/notifications/notification_platform_bridge_android.cc
+++ b/chrome/browser/notifications/notification_platform_bridge_android.cc
@@ -25,6 +25,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "components/pref_registry/pref_registry_syncable.h"
+#include "content/public/browser/browser_thread.h"
#include "content/public/common/persistent_notification_status.h"
#include "content/public/common/platform_notification_data.h"
#include "jni/ActionInfo_jni.h"
@@ -311,12 +312,15 @@ void NotificationPlatformBridgeAndroid::Close(
webapk_package);
}
-bool NotificationPlatformBridgeAndroid::GetDisplayed(
+void NotificationPlatformBridgeAndroid::GetDisplayed(
const std::string& profile_id,
bool incognito,
- std::set<std::string>* notifications) const {
- // TODO(miguelg): This can actually be implemented for M+
- return false;
+ const DisplayedNotificationsCallback& callback) const {
+ auto displayed_notifications = base::MakeUnique<std::set<std::string>>();
+ content::BrowserThread::PostTask(
+ content::BrowserThread::UI, FROM_HERE,
+ base::Bind(callback, base::Passed(&displayed_notifications),
+ false /* supports_synchronization */));
}
// static

Powered by Google App Engine
This is Rietveld 408576698