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

Unified Diff: content/browser/service_worker/service_worker_version.cc

Issue 1071203002: Consistently handle persistent notification ids as int64_t (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@n-db-Integrate
Patch Set: rebase Created 5 years, 8 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: content/browser/service_worker/service_worker_version.cc
diff --git a/content/browser/service_worker/service_worker_version.cc b/content/browser/service_worker/service_worker_version.cc
index 9103b8328798b050a9e18999257952c2285feb72..b83e16de35bda57927f06a2fdbec2528570ced88 100644
--- a/content/browser/service_worker/service_worker_version.cc
+++ b/content/browser/service_worker/service_worker_version.cc
@@ -643,26 +643,24 @@ void ServiceWorkerVersion::DispatchSyncEvent(const StatusCallback& callback) {
void ServiceWorkerVersion::DispatchNotificationClickEvent(
const StatusCallback& callback,
- const std::string& notification_id,
+ int64_t persistent_notification_id,
const PlatformNotificationData& notification_data) {
DCHECK_EQ(ACTIVATED, status()) << status();
if (running_status() != RUNNING) {
// Schedule calling this method after starting the worker.
- StartWorker(base::Bind(&RunTaskAfterStartWorker,
- weak_factory_.GetWeakPtr(), callback,
- base::Bind(&self::DispatchNotificationClickEvent,
- weak_factory_.GetWeakPtr(),
- callback, notification_id,
- notification_data)));
+ StartWorker(base::Bind(
+ &RunTaskAfterStartWorker, weak_factory_.GetWeakPtr(), callback,
+ base::Bind(&self::DispatchNotificationClickEvent,
+ weak_factory_.GetWeakPtr(), callback,
+ persistent_notification_id, notification_data)));
return;
}
int request_id = AddRequest(callback, &notification_click_callbacks_,
REQUEST_NOTIFICATION_CLICK);
- ServiceWorkerStatusCode status = embedded_worker_->SendMessage(
- ServiceWorkerMsg_NotificationClickEvent(request_id,
- notification_id,
- notification_data));
+ ServiceWorkerStatusCode status =
+ embedded_worker_->SendMessage(ServiceWorkerMsg_NotificationClickEvent(
+ request_id, persistent_notification_id, notification_data));
if (status != SERVICE_WORKER_OK) {
notification_click_callbacks_.Remove(request_id);
RunSoon(base::Bind(callback, status));
« no previous file with comments | « content/browser/service_worker/service_worker_version.h ('k') | content/child/notifications/notification_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698