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

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

Issue 2300093002: Make //content responsible for generating notification Ids (Closed)
Patch Set: comments 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 1568a412865ec0a6a58f3744178b4053c562a15c..5f6fb94faf319b6fc429c00b0748d1a2b4e95fe1 100644
--- a/chrome/browser/push_messaging/push_messaging_notification_manager.cc
+++ b/chrome/browser/push_messaging/push_messaging_notification_manager.cc
@@ -292,13 +292,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(
@@ -306,7 +306,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";
@@ -319,8 +319,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