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

Unified Diff: content/public/browser/platform_notification_context.h

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: content/public/browser/platform_notification_context.h
diff --git a/content/public/browser/platform_notification_context.h b/content/public/browser/platform_notification_context.h
index 47d6b755a5031cd4fcda09522f0a57b69cc1d9be..71da1d11c7a8943ae16762e0fc7732c44ddf762d 100644
--- a/content/public/browser/platform_notification_context.h
+++ b/content/public/browser/platform_notification_context.h
@@ -34,14 +34,14 @@ class PlatformNotificationContext
using WriteResultCallback =
base::Callback<void(bool /* success */,
- int64_t /* notification_id */)>;
+ const std::string& /* notification_id */)>;
using DeleteResultCallback = base::Callback<void(bool /* success */)>;
// Reads the data associated with |notification_id| belonging to |origin|
// from the database. |callback| will be invoked with the success status
// and a reference to the notification database data when completed.
- virtual void ReadNotificationData(int64_t notification_id,
+ virtual void ReadNotificationData(const std::string& notification_id,
const GURL& origin,
const ReadResultCallback& callback) = 0;
@@ -55,7 +55,8 @@ class PlatformNotificationContext
// Writes the data associated with a notification to a database. When this
// action completed, |callback| will be invoked with the success status and
- // the persistent notification id when written successfully.
+ // the notification id when written successfully. The notification ID field
+ // for |database_data| will be generated, and thus must be empty.
virtual void WriteNotificationData(
const GURL& origin,
const NotificationDatabaseData& database_data,
@@ -64,7 +65,7 @@ class PlatformNotificationContext
// Deletes all data associated with |notification_id| belonging to |origin|
// from the database. |callback| will be invoked with the success status
// when the operation has completed.
- virtual void DeleteNotificationData(int64_t notification_id,
+ virtual void DeleteNotificationData(const std::string& notification_id,
const GURL& origin,
const DeleteResultCallback& callback) = 0;
« no previous file with comments | « content/public/browser/notification_event_dispatcher.h ('k') | content/public/browser/platform_notification_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698