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

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

Issue 2300093002: Make //content responsible for generating notification Ids (Closed)
Patch Set: Make //content responsible for generating notification Ids Created 4 years, 3 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/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 0050c182d3af5f8bcd026e17748a867bd2dd648c..caf6ad28ce89479df80e18b58340a4d16c39d1ff 100644
--- a/chrome/browser/push_messaging/push_messaging_notification_manager.cc
+++ b/chrome/browser/push_messaging/push_messaging_notification_manager.cc
@@ -328,13 +328,13 @@ void PushMessagingNotificationManager::DidWriteNotificationDataIOProxy(
const PlatformNotificationData& notification_data,
const base::Closure& message_handled_closure,
bool success,
- int64_t persistent_notification_id) {
+ const std::string& notification_id) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::Bind(&PushMessagingNotificationManager::DidWriteNotificationData,
ui_weak_ptr, origin, notification_data,
- message_handled_closure, success, persistent_notification_id));
+ message_handled_closure, success, notification_id));
}
void PushMessagingNotificationManager::DidWriteNotificationData(
@@ -342,7 +342,7 @@ void PushMessagingNotificationManager::DidWriteNotificationData(
const PlatformNotificationData& notification_data,
const base::Closure& message_handled_closure,
bool success,
- int64_t persistent_notification_id) {
+ const std::string& notification_id) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (!success) {
DLOG(ERROR) << "Writing forced notification to database should not fail";
@@ -355,8 +355,8 @@ void PushMessagingNotificationManager::DidWriteNotificationData(
// attributed to a WebAPK on Android. This is OK because this code path is hit
// rarely.
PlatformNotificationServiceImpl::GetInstance()->DisplayPersistentNotification(
- profile_, persistent_notification_id, GURL() /* service_worker_scope */,
- origin, notification_data, NotificationResources());
+ profile_, notification_id, GURL() /* service_worker_scope */, origin,
+ notification_data, NotificationResources());
message_handled_closure.Run();
}

Powered by Google App Engine
This is Rietveld 408576698